Nathan Crookston wrote:

Duncan Exon Smith wrote:

I'm still interested in whether this is a defect, or just a limitation
of C++, if anyone has an opinion...
 
For what it's worth, I was surprised that has_trait didn't error out when passed an incomplete type.  It seems like just having it return false with incomplete types would be problematic for more than just the incorrect deduction -- it could lead to ODR violations, etc.

Perhaps the macros should have a sizeof(T) line added. . .

Looking at the implementation, it appears that the decision to return false in the event of incomplete types is intentional.  I found that surprising -- the documentation doesn't mention that, from what I see.

Nate