File indexing completed on 2025-01-18 09:40:49
0001 #ifndef BOOST_METAPARSE_V1_EMPTY_HPP
0002 #define BOOST_METAPARSE_V1_EMPTY_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/metaparse/v1/error/end_of_input_expected.hpp>
0010 #include <boost/metaparse/v1/reject.hpp>
0011 #include <boost/metaparse/v1/accept.hpp>
0012 #include <boost/metaparse/v1/define_error.hpp>
0013
0014 #include <boost/mpl/empty.hpp>
0015 #include <boost/mpl/if.hpp>
0016
0017 namespace boost
0018 {
0019 namespace metaparse
0020 {
0021 namespace v1
0022 {
0023 template <class Result>
0024 struct empty
0025 {
0026 typedef empty type;
0027
0028 template <class S, class Pos>
0029 struct apply :
0030 boost::mpl::if_<
0031 boost::mpl::empty<S>,
0032 accept<Result, S, Pos>,
0033 reject<error::end_of_input_expected, Pos>
0034 >
0035 {};
0036 };
0037 }
0038 }
0039 }
0040
0041 #endif
0042