]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/metaparse/v1/empty.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / metaparse / v1 / empty.hpp
1 #ifndef BOOST_METAPARSE_V1_EMPTY_HPP
2 #define BOOST_METAPARSE_V1_EMPTY_HPP
3
4 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2010 - 2011.
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/error/end_of_input_expected.hpp>
10 #include <boost/metaparse/v1/reject.hpp>
11 #include <boost/metaparse/v1/accept.hpp>
12 #include <boost/metaparse/v1/define_error.hpp>
13
14 #include <boost/mpl/empty.hpp>
15 #include <boost/mpl/if.hpp>
16
17 namespace boost
18 {
19 namespace metaparse
20 {
21 namespace v1
22 {
23 template <class Result>
24 struct empty
25 {
26 typedef empty type;
27
28 template <class S, class Pos>
29 struct apply :
30 boost::mpl::if_<
31 boost::mpl::empty<S>,
32 accept<Result, S, Pos>,
33 reject<error::end_of_input_expected, Pos>
34 >
35 {};
36 };
37 }
38 }
39 }
40
41 #endif
42