Variant.opCall

This pseudo-constructor creates a new Variant using a specified TypeInfo and raw pointer to the value.

  1. Variant opCall(T value)
  2. Variant opCall(TypeInfo type, void* ptr)
    struct Variant
    static
    opCall
    ()
    (,
    void* ptr
    )

Parameters

type TypeInfo

Type of the value.

ptr void*

Pointer to the value.

Return Value

Type: Variant

The new Variant.

Examples

int life = 42;
auto v = Variant(typeid(typeof(life)), &life);

Meta