The OpenD Programming Language

SharedConstOf

import std.traits;
alias SharedConstOf(T) = shared(const(T))

Parameters

T

The type to qualify

Return Value

T with the const and shared qualifiers added.

Examples

static assert(is(SharedConstOf!(int) == shared const int));
static assert(is(SharedConstOf!(int) == const shared int));

static assert(is(SharedConstOf!(inout int) == shared inout const int));
// immutable variables are implicitly shared and const
static assert(is(SharedConstOf!(immutable int) == immutable int));

Meta