]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/metaparse/test/push_front_c.cpp
1 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
6 #include <boost/metaparse/config.hpp>
7 #if BOOST_METAPARSE_STD >= 2011
8 # include <boost/metaparse/v1/cpp11/impl/push_front_c.hpp>
10 # include <boost/metaparse/v1/cpp98/impl/push_front_c.hpp>
13 #include <boost/metaparse/string.hpp>
15 #include <boost/mpl/equal_to.hpp>
16 #include <boost/mpl/char.hpp>
17 #include <boost/mpl/assert.hpp>
19 #include "test_case.hpp"
21 BOOST_METAPARSE_TEST_CASE(push_front_c
)
23 using boost::metaparse::v1::impl::push_front_c
;
24 using boost::metaparse::string
;
26 using boost::mpl::equal_to
;
27 using boost::mpl::char_
;
29 typedef string
<'h','e','l','l','o'> hello
;
33 equal_to
<hello
, push_front_c
<string
<'e','l','l','o'>, 'h'>::type
>
36 // test_push_front_to_empty
37 BOOST_MPL_ASSERT((equal_to
<string
<'x'>, push_front_c
<string
<>, 'x'>::type
>));