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 | |
15 | using namespace boost::type_erasure; |
16 | |
17 | struct a_placeholder : placeholder {}; |
18 | struct not_placeholder {}; |
19 | struct incomplete; |
20 | |
21 | template<class T> |
22 | struct t_placeholder : placeholder {}; |
23 | |
24 | template<class T> |
25 | struct t_incomplete; |
26 | |
27 | BOOST_MPL_ASSERT((is_placeholder<a_placeholder>)); |
28 | BOOST_MPL_ASSERT_NOT((is_placeholder<not_placeholder>)); |
29 | BOOST_MPL_ASSERT_NOT((is_placeholder<incomplete>)); |
30 | BOOST_MPL_ASSERT_NOT((is_placeholder<int>)); |
31 | BOOST_MPL_ASSERT_NOT((is_placeholder<void>)); |
32 | BOOST_MPL_ASSERT((is_placeholder<t_placeholder<int> >)); |
33 | BOOST_MPL_ASSERT_NOT((is_placeholder<t_incomplete<int> >)); |
34 |