Variant.isImplicitly

This member can be used to determine if the value stored in the Variant is of the specified type. This comparison attempts to take implicit conversion rules into account.

struct Variant
@property
bool
isImplicitly
(
T
)
()

Return Value

Type: bool

true if the Variant contains a value of type T, or if the Variant contains a value that can be implicitly cast to type T; false otherwise.

Examples

auto v = Variant(cast(int) 42);
assert( v.isA!(int) );
assert( v.isA!(short) ); // note implicit conversion

Meta