[cfe-dev] Tests for __is_standard_layout
Dmitri Gribenko
gribozavr at gmail.com
Thu Mar 29 14:49:11 PDT 2012
Hi,
>From test/SemaCXX/type-traits.cpp:
struct CppStructNonStandardBySameBase : CEmptyStruct {
CEmptyStruct member;
};
struct CppStructNonStandardBy2ndVirtBase : CEmptyStruct {
CEmptyStruct member;
};
...
int t16[F(__is_standard_layout(CppStructNonStandardBySameBase))];
int t17[F(__is_standard_layout(CppStructNonStandardBy2ndVirtBase))];
Both tests are identical, so either original author wanted to test
something else in the second test or that test can be safely removed.
After looking at the definition of a standard-layout class, I don't
see anything not covered by other tests.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-dev
mailing list