VariantN.hasValue

Returns true if and only if the VariantN object holds a valid value (has been initialized with, or assigned from, a valid value).

struct VariantN(size_t maxDataSize, AllowedTypesParam...)
@property const pure nothrow
bool
hasValue
()

Examples

Variant a;
assert(!a.hasValue);
Variant b;
a = b;
assert(!a.hasValue); // still no value
a = 5;
assert(a.hasValue);

Meta