The OpenD Programming Language

isRandomEngine

Test if T is a random engine. A type should define enum isRandomEngine = true; to be a random engine.

template isRandomEngine (
T
) {
static if(is(typeof(T.isRandomEngine) : bool) && is(typeof(T.init())))
static if(T.isRandomEngine && isUnsigned!R)
enum isRandomEngine;
static if(is(typeof(T.isRandomEngine) : bool) && is(typeof(T.init())))
static if(!(T.isRandomEngine && isUnsigned!R))
enum isRandomEngine;
static if(!(is(typeof(T.isRandomEngine) : bool) && is(typeof(T.init()))))
enum isRandomEngine;
}

Meta