We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the holes in @trusted.
@trusted
The text was updated successfully, but these errors were encountered:
Biggest problem: Variant isn't @safe
Variant
@safe
struct SafeVariantN(size_t maxDataSize, AllowedTypesParam...) { VariantN!(maxDataSize, AllowedTypesParam) _variant; alias _variant this; this(T)(T value) @trusted { static assert(_variant.allowed!(T), "Cannot store a " ~ T.stringof ~ " in a " ~ VariantN.stringof); _variant.opAssign(value); } ~this() @trusted { _variant.destroy(); } this(this) @trusted {} SafeVariantN opAssign(T)(T rhs) @trusted { static if (!is(T == typeof(null))) _variant = _variant.opAssign(rhs._variant); return this; } } alias SafeVariant = SafeVariantN!(maxSize!(creal, char[], void delegate())); ... else static if (hasMember!(T, "_variant")) { static if (typeof(T.init._variant).stringof[0..8] == "VariantN") enum isVariantN = true; else enum isVariantN = false; } ... import ddb.db : Variant = SafeVariant;
Sorry, something went wrong.
No branches or pull requests
Fix the holes in
@trusted
.The text was updated successfully, but these errors were encountered: