merge new MPL version from 'mplbook' branch

[SVN r24874]
This commit is contained in:
Aleksey Gurtovoy
2004-09-02 15:41:37 +00:00
parent e2e70427cc
commit 1689c8ef83
1216 changed files with 89913 additions and 36752 deletions
+18 -33
View File
@@ -1,42 +1,27 @@
//-----------------------------------------------------------------------------
// boost mpl/test/integral_c.cpp source file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
// Copyright Aleksey Gurtovoy 2001-2004
//
// Copyright (c) 2001-02
// Aleksey Gurtovoy
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// Distributed under the Boost Software License,Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
#include "boost/mpl/integral_c.hpp"
#include "boost/mpl/assert_is_same.hpp"
#include "boost/static_assert.hpp"
#include "boost/preprocessor/repeat.hpp"
// $Source$
// $Date$
// $Revision$
#include <cassert>
#include <boost/mpl/integral_c.hpp>
#include <boost/preprocessor/repeat.hpp>
namespace mpl = boost::mpl;
#include "integral_wrapper_test.hpp"
#define INTEGRAL_C_TEST(z, i, T) \
{ \
typedef mpl::integral_c<T,i> c##i; \
typedef mpl::integral_c<T,i+1> next_c##i; \
typedef mpl::integral_c<T,i-1> prior_c##i; \
{ BOOST_MPL_ASSERT_IS_SAME(c##i::value_type, T); } \
{ BOOST_MPL_ASSERT_IS_SAME(c##i::type, c##i); } \
{ BOOST_MPL_ASSERT_IS_SAME(c##i::next, next_c##i); } \
{ BOOST_MPL_ASSERT_IS_SAME(c##i::prior, prior_c##i); } \
{ BOOST_STATIC_ASSERT(c##i::value == i); } \
assert(c##i() == i); \
}
/**/
int main()
MPL_TEST_CASE()
{
BOOST_PP_REPEAT(10, INTEGRAL_C_TEST, char)
BOOST_PP_REPEAT(10, INTEGRAL_C_TEST, short)
BOOST_PP_REPEAT(10, INTEGRAL_C_TEST, int)
return 0;
# define WRAPPER(T, i) integral_c<T,i>
BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, char)
BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, short)
BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, int)
BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, long)
}