Value.this

  1. this(in T other)
    struct Value
    @safe
    this
    pure
    (
    T
    )
    (
    in T other
    )
    if (
    isOwnPOD!T ||
    is(Unqual!T == Value)
    )
  2. this(in T[] value)
  3. this(in V[K] value)
  4. this(in Type t)

Examples

1 assert(Value(null).type == Value.Type.null_);
2 assert(Value(true).type == Value.Type.bool_);
3 assert(Value(-123).type == Value.Type.integer);
4 assert(Value(+123).type == Value.Type.integer);
5 assert(Value(3.14).type == Value.Type.float_);
6 assert(Value("ad").type == Value.Type.str);
7 assert(Value(["ab","cd"]).type == Value.Type.array);
8 assert(Value(["ab":"cd"]).type == Value.Type.map);

Meta