
"Arkadiy Vertleyb" <vertleyb@hotmail.com> writes:
The provided example shows what registration needs to be done to calculate the type of a lambda functor:
#include BOOST_TYPEOF_BEGIN_REGISTRATION()
Where would that line go, in a header file?
BOOST_TYPEOF_REGISTER_TEMPLATE(tuples::tuple, 2); BOOST_TYPEOF_REGISTER_TEMPLATE(lambda_functor, 1); BOOST_TYPEOF_REGISTER_TEMPLATE(lambda_functor_base, 2); BOOST_TYPEOF_REGISTER_TEMPLATE(relational_action, 1); BOOST_TYPEOF_REGISTER_TEMPLATE(logical_action, 1); BOOST_TYPEOF_REGISTER_TYPE(greater_action); BOOST_TYPEOF_REGISTER_TYPE(less_action); BOOST_TYPEOF_REGISTER_TYPE(and_action); BOOST_TYPEOF_REGISTER_TYPE(placeholder<1>); BOOST_TYPEOF_REGISTER_TYPE(placeholder<2>);
#include BOOST_TYPEOF_END_REGISTRATION()
Where would that line go, in a source file? If so, that sounds error-prone to me. FYI, to take advantage of GCC's buggy __typeof__, you may have to accept some limitations on its type argument. I think it has problems with references or something. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com