[Issue 18183] std.variant should be usable in @safe
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 28 22:23:01 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=18183
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
Fully agree. Would it be reasonable to have a SafeVariant type that excludes
any types which cannot run all the variant code with @safe?
I'm running into this, because I'm trying to make everything in mysql-native
safe, and it uses Variant a lot.
It's going to be really hard to make Variant safe "when it needs to be", since
you can't overload based on @safe, and you can't detect whether the caller is
asking for a safe call in a template.
--
More information about the Digitalmars-d-bugs
mailing list