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