1 #ifndef BOOST_METAPARSE_V1_CPP11_IMPL_POP_BACK_HPP
2 #define BOOST_METAPARSE_V1_CPP11_IMPL_POP_BACK_HPP
3 
4 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2013.
5 // Distributed under the Boost Software License, Version 1.0.
6 //    (See accompanying file LICENSE_1_0.txt or copy at
7 //          http://www.boost.org/LICENSE_1_0.txt)
8 
9 #include <boost/metaparse/v1/cpp11/fwd/string.hpp>
10 #include <boost/metaparse/v1/cpp11/impl/push_front_c.hpp>
11 #include <boost/metaparse/v1/cpp11/impl/size.hpp>
12 
13 #include <boost/mpl/clear.hpp>
14 
15 namespace boost
16 {
17   namespace metaparse
18   {
19     namespace v1
20     {
21       namespace impl
22       {
23         template <class S>
24         struct pop_back;
25 
26         template <char C>
27         struct pop_back<string<C>> : boost::mpl::clear<string<C>> {};
28 
29         template <char C, char... Cs>
30         struct pop_back<string<C, Cs...>> :
31           push_front_c<typename pop_back<string<Cs...>>::type, C>
32         {};
33       }
34     }
35   }
36 }
37 
38 #endif
39 
40