Compare commits

..

1 Commits

Author SHA1 Message Date
46b4482b2f This commit was manufactured by cvs2svn to create branch
'python-v2-dev'.

[SVN r14785]
2002-08-12 13:35:54 +00:00
3 changed files with 24 additions and 44 deletions

30
Jamfile
View File

@ -1,22 +1,16 @@
subproject libs/static_assert ;
# bring in the rules for testing
SEARCH on testing.jam = $(BOOST_BUILD_PATH) ;
include testing.jam ;
test-suite static_assert :
[ run static_assert_test.cpp ]
[ run static_assert_example_1.cpp ]
[ run static_assert_example_2.cpp ]
[ run static_assert_example_3.cpp ]
[ compile-fail static_assert_test_fail_1.cpp ]
[ compile-fail static_assert_test_fail_2.cpp ]
[ compile-fail static_assert_test_fail_3.cpp ]
[ compile-fail static_assert_test_fail_4.cpp ]
[ compile-fail static_assert_test_fail_5.cpp ]
[ compile-fail static_assert_test_fail_6.cpp ]
[ compile-fail static_assert_test_fail_7.cpp ]
[ compile-fail static_assert_test_fail_8.cpp ]
;
unit-test static_assert_test : static_assert_test.cpp
: <sysinclude>$(BOOST_ROOT) : ;
unit-test static_assert_example_1 : static_assert_example_1.cpp
: <sysinclude>$(BOOST_ROOT) : ;
unit-test static_assert_example_2 : static_assert_example_2.cpp
: <sysinclude>$(BOOST_ROOT) : ;
unit-test static_assert_example_3 : static_assert_example_3.cpp
: <sysinclude>$(BOOST_ROOT) : ;

View File

@ -4,7 +4,7 @@
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
// See http://www.boost.org/libs/static_assert for documentation.
// See http://www.boost.org for most recent version including documentation.
/*
Revision history:
@ -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> { enum { value = 1 }; };
template <> struct STATIC_ASSERTION_FAILURE<true>{};
// HP aCC cannot deal with missing names for template value parameters
template<int x> struct static_assert_test{};
@ -58,28 +58,19 @@ template<int x> struct static_assert_test{};
// when used inside integral constant expressions.
//
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) && !defined(__MWERKS__)
#if defined(BOOST_MSVC)
#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
// __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 ) \
@ -89,3 +80,7 @@ template<int x> struct static_assert_test{};
#endif // BOOST_STATIC_ASSERT_HPP

View File

@ -1,9 +0,0 @@
<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>