Slight problem testing BOOST_STATIC_ASSERT

Maybe I missed something in my quick glance.... I just downloaded Boost 1.31.0, and took random looks/comparisons at some of the files. The test files for BOOST_STATIC_ASSERT have something like: BOOST_STATIC_ASSERT( sizeof(int) == sizeof(char) ) // should fail Whoever wrote this should know that platforms that have EVERY built-in type be the same size are allowed! The only guarantee for size differences would be to use "T" v. "T[L]" or "T[N]" v. "T[M]", where N and M are different compile-time constants and L cannot be 1. -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com

Daryle Walker <darylew@hotmail.com> writes:
Maybe I missed something in my quick glance....
I just downloaded Boost 1.31.0, and took random looks/comparisons at some of the files. The test files for BOOST_STATIC_ASSERT have something like:
BOOST_STATIC_ASSERT( sizeof(int) == sizeof(char) ) // should fail
Whoever wrote this should know that platforms that have EVERY built-in type be the same size are allowed! The only guarantee for size differences would be to use "T" v. "T[L]" or "T[N]" v. "T[M]", where N and M are different compile-time constants and L cannot be 1.
Good eye; those tests need to be fixed. John? -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
Daryle Walker
-
David Abrahams