RFC: std.sumtype (adding sumtype to Phobos)
john.michael.hall at gmail.com
Wed Nov 25 18:42:09 UTC 2020
On Wednesday, 25 November 2020 at 17:53:41 UTC, bachmeier wrote:
> If that's the case, I agree that it's a good thing to show. You
> might consider having a clean version of toFahrenheit and then
> something like
> // SumType can be used in @safe/pure/nothrow/@nogc code
> pure @safe @nogc nothrow
> void freeze(ref Temperature t)
> Whatever you do with that, it clears up my concern and I would
> like to see this added to Phobos.
In general, if you can call a function in a block with all the
attributes, then you can call it without them all too, but that
may not be known to someone who has not made much use of them.
More information about the Digitalmars-d