]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #ifndef BOOST_METAPARSE_V1_PUSH_BACK_C_HPP |
2 | #define BOOST_METAPARSE_V1_PUSH_BACK_C_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/config.hpp> | |
10 | #include <boost/metaparse/v1/fwd/string.hpp> | |
11 | #include <boost/metaparse/v1/impl/update_c.hpp> | |
12 | #include <boost/metaparse/v1/impl/size.hpp> | |
13 | ||
14 | namespace boost | |
15 | { | |
16 | namespace metaparse | |
17 | { | |
18 | namespace v1 | |
19 | { | |
20 | namespace impl | |
21 | { | |
22 | template <class S, char C> | |
23 | struct push_back_c; | |
24 | ||
25 | #ifdef BOOST_METAPARSE_VARIADIC_STRING | |
26 | template <char... Cs, char C> | |
27 | struct push_back_c<string<Cs...>, C> : string<Cs..., C> {}; | |
28 | #else | |
29 | template <class S, char C> | |
30 | struct push_back_c : | |
31 | update_c<typename S::type, size<typename S::type>::type::value, C> | |
32 | {}; | |
33 | #endif | |
34 | } | |
35 | } | |
36 | } | |
37 | } | |
38 | ||
39 | #endif | |
40 |