1// Boost.TypeErasure library
2//
3// Copyright 2012 Steven Watanabe
4//
5// Distributed under the Boost Software License Version 1.0. (See
6// accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9// $Id$
10
11#include <boost/type_erasure/is_placeholder.hpp>
12#include <boost/type_erasure/placeholder.hpp>
13#include <boost/mpl/assert.hpp>
14
15using namespace boost::type_erasure;
16
17struct a_placeholder : placeholder {};
18struct not_placeholder {};
19struct incomplete;
20
21template<class T>
22struct t_placeholder : placeholder {};
23
24template<class T>
25struct t_incomplete;
26
27BOOST_MPL_ASSERT((is_placeholder<a_placeholder>));
28BOOST_MPL_ASSERT_NOT((is_placeholder<not_placeholder>));
29BOOST_MPL_ASSERT_NOT((is_placeholder<incomplete>));
30BOOST_MPL_ASSERT_NOT((is_placeholder<int>));
31BOOST_MPL_ASSERT_NOT((is_placeholder<void>));
32BOOST_MPL_ASSERT((is_placeholder<t_placeholder<int> >));
33BOOST_MPL_ASSERT_NOT((is_placeholder<t_incomplete<int> >));
34

source code of boost/libs/type_erasure/test/test_is_placeholder.cpp