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.
Comment #2 by robert.schadek — 2024-12-01T16:31:46Z