Join ralf_grosse_kunstleve with HEAD

[SVN r9444]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-03-05 20:01:01 +00:00
parent 4bab0aef74
commit 149538e2f7
2 changed files with 4 additions and 3 deletions

View File

@ -52,7 +52,7 @@ template<int> struct static_assert_test{};
// used as an enum initialiser, or as a template argument depending which version // used as an enum initialiser, or as a template argument depending which version
// is in use... // is in use...
// //
#ifndef BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS #if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) && !defined(__MWERKS__)
#ifndef BOOST_MSVC #ifndef BOOST_MSVC
#define BOOST_STATIC_ASSERT( B ) \ #define BOOST_STATIC_ASSERT( B ) \
typedef ::boost::static_assert_test<\ typedef ::boost::static_assert_test<\
@ -60,7 +60,7 @@ template<int> struct static_assert_test{};
BOOST_ASSERT_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ASSERT_JOIN(boost_static_assert_typedef_, __LINE__)
#else #else
// __LINE__ macro broken when -ZI is used see Q199057 // __LINE__ macro broken when -ZI is used see Q199057
// fortunately MSVC ignores duplicate typedef's: // fortunately MSVC ignores duplicate typedef's.
#define BOOST_STATIC_ASSERT( B ) \ #define BOOST_STATIC_ASSERT( B ) \
typedef ::boost::static_assert_test<\ typedef ::boost::static_assert_test<\
sizeof(::boost::STATIC_ASSERTION_FAILURE< ( B ) >)\ sizeof(::boost::STATIC_ASSERTION_FAILURE< ( B ) >)\

View File

@ -18,7 +18,7 @@ RandonAccessIterator foo(RandonAccessIterator from, RandonAccessIterator to)
// this template can only be used with // this template can only be used with
// random access iterators... // random access iterators...
typedef typename std::iterator_traits< RandonAccessIterator >::iterator_category cat; typedef typename std::iterator_traits< RandonAccessIterator >::iterator_category cat;
BOOST_STATIC_ASSERT((boost::is_convertible<cat, const std::random_access_iterator_tag&>::value)); BOOST_STATIC_ASSERT((boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
// //
// detail goes here... // detail goes here...
return from; return from;
@ -35,3 +35,4 @@ int main()