isEponymousTemplate

Indicates wether a type or a variable type is an eponymous template.

  1. template isEponymousTemplate(T)
    template isEponymousTemplate (
    T
    ) {
    enum p;
    enum isEponymousTemplate;
    enum isEponymousTemplate;
    }
  2. template isEponymousTemplate(alias T)

Examples

1 static class A(T){}
2 static struct B(T){}
3 static assert(isEponymousTemplate!(A!int));
4 static assert(isEponymousTemplate!(B!int));
5 static assert(!isEponymousTemplate!int);
6 template C(T)
7 {
8     static class C{}
9 }
10 static assert(isEponymousTemplate!(C!int));

Meta