Alias GlobalPtr.opUnary

Operator *, same as method 'get'.

struct GlobalPtr
{
  // ...
  alias opUnary(string op : "*") = get;
  // ...
}

Examples

GlobalPtr!long x = new long(123);
assert(*x == 123);

(*x = 321);
assert(*x == 321);

const y = x;
assert(*y == 321);
assert(*x == 321);

static assert(is(typeof(*y) == const long));