Template detection
Enamex via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 13 02:29:12 PDT 2015
On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru Ermicioi
wrote:
> Hello,
>
> Given:
>
> class SomeClass {
>
> public {
> void someSimpleMethod() {}
>
> template setOfTemplatedMethods(Type) {
> void templatedMethodOne() {}
> void templatedMethodTwo() {}
> }
> }
> }
>
> Is there a way to detect at compile time if a member of
> class/struct is a template? (in the example above, if
> setOfTemplatedMethods is a template).
There's this:
http://stackoverflow.com/questions/5483381/test-if-an-alias-is-a-template-in-d-2-0
and it should work with 'member templates' OK.
More information about the Digitalmars-d-learn
mailing list