File indexing completed on 2025-01-18 09:39:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_LAMBDA_SELECT_FUNCTIONS_HPP
0013 #define BOOST_LAMBDA_SELECT_FUNCTIONS_HPP
0014
0015 namespace boost {
0016 namespace lambda {
0017 namespace detail {
0018
0019
0020
0021 template<class Any, CALL_TEMPLATE_ARGS>
0022 inline Any& select(Any& any, CALL_FORMAL_ARGS) { CALL_USE_ARGS; return any; }
0023
0024
0025 template<class Arg, CALL_TEMPLATE_ARGS>
0026 inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
0027 select ( const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) {
0028 return op.template call<
0029 typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
0030 >(CALL_ACTUAL_ARGS);
0031 }
0032 template<class Arg, CALL_TEMPLATE_ARGS>
0033 inline typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
0034 select ( lambda_functor<Arg>& op, CALL_FORMAL_ARGS) {
0035 return op.template call<
0036 typename Arg::template sig<tuple<CALL_REFERENCE_TYPES> >::type
0037 >(CALL_ACTUAL_ARGS);
0038 }
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 template<class RET> struct r_select {
0051
0052
0053 template<class Any, CALL_TEMPLATE_ARGS>
0054 static
0055 inline RET go (Any& any, CALL_FORMAL_ARGS) { CALL_USE_ARGS; return any; }
0056
0057
0058 template<class Arg, CALL_TEMPLATE_ARGS>
0059 static
0060 inline RET go (const lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) {
0061 return op.template call<RET>(CALL_ACTUAL_ARGS);
0062 }
0063 template<class Arg, CALL_TEMPLATE_ARGS>
0064 static
0065 inline RET go (lambda_functor<Arg>& op, CALL_FORMAL_ARGS ) {
0066 return op.template call<RET>(CALL_ACTUAL_ARGS);
0067 }
0068 };
0069
0070 }
0071 }
0072 }
0073
0074 #endif