Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/mpl/test/is_placeholder.cpp @ 20

Last change on this file since 20 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.2 KB
Line 
1
2// Copyright Aleksey Gurtovoy 2000-2004
3//
4// Distributed under the Boost Software License, Version 1.0.
5// (See accompanying file LICENSE_1_0.txt or copy at
6// http://www.boost.org/LICENSE_1_0.txt)
7//
8// See http://www.boost.org/libs/mpl for documentation.
9
10// $Source: /cvsroot/boost/boost/libs/mpl/test/is_placeholder.cpp,v $
11// $Date: 2004/09/02 15:41:35 $
12// $Revision: 1.4 $
13
14#include <boost/mpl/is_placeholder.hpp>
15#include <boost/mpl/placeholders.hpp>
16#include <boost/mpl/aux_/test.hpp>
17
18#include <boost/preprocessor/repeat.hpp>
19#include <boost/preprocessor/inc.hpp>
20#include <boost/preprocessor/cat.hpp>
21   
22#define AUX_IS_PLACEHOLDER_TEST(unused1, n, unused2) \
23    { MPL_ASSERT(( is_placeholder< \
24          BOOST_PP_CAT(_,BOOST_PP_INC(n)) \
25        > )); } \
26/**/
27
28MPL_TEST_CASE()
29{
30    MPL_ASSERT_NOT(( is_placeholder<int> ));
31    MPL_ASSERT_NOT(( is_placeholder<UDT> ));
32    MPL_ASSERT_NOT(( is_placeholder<incomplete> ));
33    MPL_ASSERT_NOT(( is_placeholder<abstract> ));
34    MPL_ASSERT_NOT(( is_placeholder<noncopyable> ));
35    MPL_ASSERT(( is_placeholder<_> ));
36   
37    BOOST_PP_REPEAT(
38          BOOST_MPL_LIMIT_METAFUNCTION_ARITY
39        , AUX_IS_PLACEHOLDER_TEST
40        , unused
41        )
42}
Note: See TracBrowser for help on using the repository browser.