Compare commits

..

2 Commits

Author SHA1 Message Date
2603b44db1 This commit was manufactured by cvs2svn to create tag
'Version_1_31_0'.

[SVN r22162]
2004-02-04 15:24:32 +00:00
fdd69b068a This commit was manufactured by cvs2svn to create branch 'RC_1_31_0'.
[SVN r21427]
2003-12-30 12:10:04 +00:00
4 changed files with 5 additions and 10 deletions

View File

@ -10,11 +10,9 @@
//
// all these tests should fail:
//
typedef char a1[2];
typedef char a2[3];
// Namespace scope
BOOST_STATIC_ASSERT(sizeof(a1) == sizeof(a2)); // will not compile
BOOST_STATIC_ASSERT(sizeof(int) == sizeof(char)); // will not compile

View File

@ -10,13 +10,11 @@
//
// all these tests should fail:
//
typedef char a1[2];
typedef char a2[3];
// Function (block) scope
void f()
{
BOOST_STATIC_ASSERT(sizeof(a1) == sizeof(a2)); // should not compile
BOOST_STATIC_ASSERT(sizeof(int) == sizeof(char)); // should not compile
}

View File

@ -10,13 +10,11 @@
//
// 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(a1) == sizeof(a2)); // will not compile
BOOST_STATIC_ASSERT(sizeof(int) == sizeof(char)); // will not compile
public:
// Member function scope: provides access to member variables
@ -28,6 +26,7 @@ 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;
}
};

View File

@ -18,7 +18,7 @@ struct Bob
public:
// Member function scope: provides access to member variables
char x[4];
int x;
char c;
int f()
{