delorie.com/archives/browse.cgi | search |
Greg Chicares wrote: > On 2009-08-20 11:54Z, Dave Korn wrote: >> [...] (Hmm, now there's an idea. GCC needs an >> __attribute__ that you can tag onto a class to say it must be a POD-type and >> get a compiler error if anyone ever adds a virtual function or anything else >> that would make the layout non-POD.) > > http://groups.google.com/group/comp.lang.c++.moderated/msg/71ae531aa27e70c5 > | GCC 4.3.1 provides the __is_pod extension > ... > | tr1/type_traits is implemented using __is_pod > > Combining that with static_assert, I suppose you could write > this restriction in standard C++ (TR1) instead of creating a > new __attribute__. Ooh, nice trick. Thanks. cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |