merge new MPL version from 'mplbook' branch
[SVN r24874]
This commit is contained in:
1 parent
e2e70427cc
commit
1689c8ef83
1216 files changed
+89913
-36752
No files matched your search
+25
-27
@@ -1,44 +1,42 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/test/is_placeholder.cpp source file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Copyright (c) 2000-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/is_placeholder.hpp"
|
||||
#include "boost/mpl/placeholders.hpp"
|
||||
// $Source$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include "boost/preprocessor/repeat.hpp"
|
||||
#include "boost/preprocessor/inc.hpp"
|
||||
#include "boost/preprocessor/cat.hpp"
|
||||
#include "boost/static_assert.hpp"
|
||||
#include <boost/mpl/is_placeholder.hpp>
|
||||
#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
using namespace boost::mpl;
|
||||
|
||||
struct UDT;
|
||||
#include <boost/preprocessor/repeat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#define AUX_IS_PLACEHOLDER_TEST(unused1, n, unused2) \
|
||||
{ BOOST_STATIC_ASSERT(is_placeholder< \
|
||||
{ MPL_ASSERT(( is_placeholder< \
|
||||
BOOST_PP_CAT(_,BOOST_PP_INC(n)) \
|
||||
>::value); } \
|
||||
> )); } \
|
||||
/**/
|
||||
|
||||
int main()
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
BOOST_STATIC_ASSERT(!is_placeholder<int>::value);
|
||||
BOOST_STATIC_ASSERT(!is_placeholder<UDT>::value);
|
||||
BOOST_STATIC_ASSERT(is_placeholder<_>::value);
|
||||
MPL_ASSERT_NOT(( is_placeholder<int> ));
|
||||
MPL_ASSERT_NOT(( is_placeholder<UDT> ));
|
||||
MPL_ASSERT_NOT(( is_placeholder<incomplete> ));
|
||||
MPL_ASSERT_NOT(( is_placeholder<abstract> ));
|
||||
MPL_ASSERT_NOT(( is_placeholder<noncopyable> ));
|
||||
MPL_ASSERT(( is_placeholder<_> ));
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_MPL_METAFUNCTION_MAX_ARITY
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
, AUX_IS_PLACEHOLDER_TEST
|
||||
, unused
|
||||
)
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user