Compare commits

..

4 Commits

Author SHA1 Message Date
d919a89ee3 This commit was manufactured by cvs2svn to create tag
'Version_1_29_0'.

[SVN r15904]
2002-10-11 15:17:55 +00:00
d36717110d This commit was manufactured by cvs2svn to create branch 'RC_1_29_0'.
[SVN r15460]
2002-09-19 20:49:39 +00:00
1029ee8032 Intel C++ fix
[SVN r15351]
2002-09-16 01:19:05 +00:00
f2732e699f init commit
[SVN r14977]
2002-08-19 23:29:18 +00:00
2 changed files with 25 additions and 11 deletions

View File

@ -28,7 +28,7 @@ namespace boost{
// HP aCC cannot deal with missing names for template value parameters
template <bool x> struct STATIC_ASSERTION_FAILURE;
template <> struct STATIC_ASSERTION_FAILURE<true>{};
template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
// HP aCC cannot deal with missing names for template value parameters
template<int x> struct static_assert_test{};
@ -58,19 +58,28 @@ template<int x> struct static_assert_test{};
// when used inside integral constant expressions.
//
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) && !defined(__MWERKS__)
#ifndef BOOST_MSVC
#define BOOST_STATIC_ASSERT( B ) \
typedef ::boost::static_assert_test<\
sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)>\
BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
#else
#if defined(BOOST_MSVC)
// __LINE__ macro broken when -ZI is used see Q199057
// fortunately MSVC ignores duplicate typedef's.
#define BOOST_STATIC_ASSERT( B ) \
typedef ::boost::static_assert_test<\
sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)\
> boost_static_assert_typedef_
#elif defined(BOOST_INTEL_CXX_VERSION)
// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
// instead of warning in case of failure
# define BOOST_STATIC_ASSERT( B ) \
typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
[ ::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >::value ]
#else
// generic version
#define BOOST_STATIC_ASSERT( B ) \
typedef ::boost::static_assert_test<\
sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)>\
BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
#endif
#else
// alternative enum based implementation:
#define BOOST_STATIC_ASSERT( B ) \
@ -80,7 +89,3 @@ template<int x> struct static_assert_test{};
#endif // BOOST_STATIC_ASSERT_HPP

9
index.html Normal file
View File

@ -0,0 +1,9 @@
<html>
<head>
<meta http-equiv="refresh" content="0; URL=static_assert.htm">
</head>
<body>
Automatic redirection failed, please go to
<a href="static_assert.htm">static_assert.htm</a>.
</body>
</html>