Re: Template detection

2015-09-22 Thread Meta via Digitalmars-d-learn
On Tuesday, 22 September 2015 at 16:11:59 UTC, Alexandru Ermicioi wrote: Thx. Didn't know that there is such trait available. On page http://dlang.org/traits.html it's not present. Yeah, it's undocumented for some reason. Somebody must've forgot to make a corresponding doc pull request I supp

Re: Template detection

2015-09-22 Thread Alexandru Ermicioi via Digitalmars-d-learn
On Tuesday, 22 September 2015 at 15:37:32 UTC, Meta wrote: On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru Ermicioi wrote: Hello, Given: class SomeClass { public { void someSimpleMethod() {} template setOfTemplatedMethods(Type) { void templatedMethodOn

Re: Template detection

2015-09-22 Thread Meta via Digitalmars-d-learn
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() {} }

Re: Template detection

2015-09-22 Thread Alexandru Ermicioi via Digitalmars-d-learn
xpression from static if is false. Is such behavior of static if correct (tested also with ldc compiler, same results)? If there are other test cases, would be glad if they are posted here (to improve the accuracy of template detection). Tests are: struct FooS(T) { struct Inner {}

Re: Template detection

2015-09-13 Thread Enamex via Digitalmars-d-learn
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() {} }

Template detection

2015-09-13 Thread Alexandru Ermicioi via Digitalmars-d-learn
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/str