The OpenD Programming Language

stateSize

Returns the size in bytes of the state that needs to be allocated to hold an object of type T. stateSize!T is zero for structs that are not nested and have no nonstatic member variables.

template stateSize (
T
) {
static if(is(T == class) || is(T == interface))
enum stateSize;
static if(!(is(T == class) || is(T == interface)))
static if(is(T == struct) || is(T == union))
enum stateSize;
static if(!(is(T == class) || is(T == interface)))
static if(!(is(T == struct) || is(T == union)))
static if(is(T == void))
enum size_t stateSize;
static if(!(is(T == class) || is(T == interface)))
static if(!(is(T == struct) || is(T == union)))
static if(!(is(T == void)))
enum stateSize;
}

Meta