Changed tests to guarantee portability

[SVN r22245]
This commit is contained in:
John Maddock
2004-02-12 11:29:47 +00:00
parent 328b4fee16
commit 68545773d5
4 changed files with 10 additions and 5 deletions

View File

@ -10,11 +10,13 @@
//
// this tests should fail:
//
typedef char a1[2];
typedef char a2[3];
struct Bob
{
private: // can be in private, to avoid namespace pollution
BOOST_STATIC_ASSERT(sizeof(int) == sizeof(char)); // will not compile
BOOST_STATIC_ASSERT(sizeof(a1) == sizeof(a2)); // will not compile
public:
// Member function scope: provides access to member variables
@ -26,7 +28,6 @@ struct Bob
BOOST_STATIC_ASSERT(sizeof(x) == 4);
BOOST_STATIC_ASSERT(sizeof(c) == 1);
#endif
//BOOST_STATIC_ASSERT((sizeof(x) == sizeof(c))); // should not compile
return x;
}
};