File indexing completed on 2025-01-31 10:02:39
0001
0002
0003
0004
0005
0006
0007 #if !defined(BOOST_SPIRIT_X3_LAMBDA_VISITOR_MAY_19_2014_1116AM)
0008 #define BOOST_SPIRIT_X3_LAMBDA_VISITOR_MAY_19_2014_1116AM
0009
0010 namespace boost { namespace spirit { namespace x3
0011 {
0012 template <typename RT, typename... Lambdas>
0013 struct lambda_visitor;
0014
0015 template <typename RT, typename F, typename... Lambdas>
0016 struct lambda_visitor<RT, F, Lambdas...> : F, lambda_visitor<RT, Lambdas...>
0017 {
0018 typedef lambda_visitor<RT , Lambdas...> base_type;
0019 using F::operator();
0020 using base_type::operator();
0021 lambda_visitor(F f, Lambdas... lambdas)
0022 : F(f), base_type(lambdas...)
0023 {}
0024 };
0025
0026 template <typename RT, typename F>
0027 struct lambda_visitor<RT, F> : F
0028 {
0029 typedef RT result_type;
0030 using F::operator();
0031 lambda_visitor(F f)
0032 : F(f)
0033 {}
0034 };
0035
0036 template <typename RT>
0037 struct lambda_visitor<RT>
0038 {
0039 typedef RT result_type;
0040 };
0041
0042 template <typename RT, typename... Lambdas>
0043 lambda_visitor<RT, Lambdas...> make_lambda_visitor(Lambdas... lambdas)
0044 {
0045 return { lambdas... };
0046 }
0047 }}}
0048
0049 #endif