Re: Check type is a struct at compile time?

2014-12-18 Thread shona123 via Digitalmars-d-learn
But how to do the same thing for a struct? _ dhoom

Re: Check type is a struct at compile time?

2014-12-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, December 05, 2014 20:38:30 Gary Willoughby via Digitalmars-d-learn wrote: How can i check that a type is a struct at compile time? I know i can test for a class like this: static if(is(T == class)) { ... } But how to do the same thing for a struct? static if(is(T ==

Re: Check type is a struct at compile time?

2014-12-05 Thread Kapps via Digitalmars-d-learn
On Friday, 5 December 2014 at 20:38:31 UTC, Gary Willoughby wrote: How can i check that a type is a struct at compile time? I know i can test for a class like this: static if(is(T == class)) { ... } But how to do the same thing for a struct? Same thing but with struct: is(T == struct)