Files
mpl/test/is_placeholder.cpp

43 lines
1.1 KiB
C++
Raw Permalink Normal View History

// Copyright Aleksey Gurtovoy 2000-2004
2002-11-28 06:58:37 +00:00
//
// 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.
2002-11-28 06:58:37 +00:00
2008-10-10 09:21:07 +00:00
// $Id$
// $Date$
// $Revision$
2002-11-28 06:58:37 +00:00
#include <boost/mpl/is_placeholder.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/inc.hpp>
#include <boost/preprocessor/cat.hpp>
2002-11-28 06:58:37 +00:00
#define AUX_IS_PLACEHOLDER_TEST(unused1, n, unused2) \
{ MPL_ASSERT(( is_placeholder< \
2002-11-28 06:58:37 +00:00
BOOST_PP_CAT(_,BOOST_PP_INC(n)) \
> )); } \
2002-11-28 06:58:37 +00:00
/**/
MPL_TEST_CASE()
2002-11-28 06:58:37 +00:00
{
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<_> ));
2002-11-28 06:58:37 +00:00
BOOST_PP_REPEAT(
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
2002-11-28 06:58:37 +00:00
, AUX_IS_PLACEHOLDER_TEST
, unused
)
}