identifier

Returns "name" (identifier) of a given symbol as string

When used with aggregate type field, will return only name of field itself, without any qualification.

template identifier (
alias Sym
) {}

Members

Manifest constants

identifier
enum identifier;
Undocumented in source.

Parameters

Sym

any symbol alias

Examples

class ClassName { int fieldName; }

static assert (identifier!(ClassName) == "ClassName");
assert (identifier!(ClassName) == "ClassName");

static assert (identifier!(ClassName.fieldName) == "fieldName");
assert (identifier!(ClassName.fieldName) == "fieldName");

void funcName ( ) { }

static assert (identifier!(funcName) == "funcName");
assert (identifier!(funcName) == "funcName");

extern(C) static void funcNameArgs ( int a, double b ) { }

static assert (identifier!(funcNameArgs) == "funcNameArgs");
assert (identifier!(funcNameArgs) == "funcNameArgs");

Meta