How to test for type without refs?

2015-03-17 Thread Charles Hixson via Digitalmars-d-learn
I thought that in: T* user(T)() {static assert (T.sizeof bfHdr.user_.length); static assert (__traits(isPOD, T) ); returncast(T*) bfHdr.user_.ptr; } the line: static assert (__traits(isPOD, T) ); would test for there not being any embedded refs, pointers,

Re: How to test for type without refs?

2015-03-17 Thread anonymous via Digitalmars-d-learn
On Tuesday, 17 March 2015 at 14:06:19 UTC, Charles Hixson wrote: I thought that in: T* user(T)() {static assert (T.sizeof bfHdr.user_.length); static assert (__traits(isPOD, T) ); returncast(T*) bfHdr.user_.ptr; } the line: static assert (__traits(isPOD,

Re: How to test for type without refs?

2015-03-17 Thread Charles Hixson via Digitalmars-d-learn
On 03/17/2015 07:27 AM, anonymous via Digitalmars-d-learn wrote: On Tuesday, 17 March 2015 at 14:06:19 UTC, Charles Hixson wrote: I thought that in: T* user(T)() {static assert (T.sizeof bfHdr.user_.length); static assert (__traits(isPOD, T) ); return