digitalmars.D - test if a parameter is a struct
- Moritz Warning (3/3) May 19 2008 I need to test if a template parameter is a struct.
- Ary Borenszweig (6/9) May 19 2008 template Foo(T) {
- Moritz Warning (2/13) May 19 2008 I didn't thought it would be that easy. :)
I need to test if a template parameter is a struct. Is there a way to find out? - thanks
May 19 2008
Moritz Warning escribió:I need to test if a template parameter is a struct. Is there a way to find out? - thankstemplate Foo(T) { static if(is(T == struct)) { } } http://digitalmars.com/d/1.0/expression.html#IsExpression
May 19 2008
On Tue, 20 May 2008 00:28:27 -0300, Ary Borenszweig wrote:Moritz Warning escribió:I didn't thought it would be that easy. :)I need to test if a template parameter is a struct. Is there a way to find out? - thankstemplate Foo(T) { static if(is(T == struct)) { } } http://digitalmars.com/d/1.0/expression.html#IsExpression
May 19 2008