
This code builds and runs under g++ 4.2.2. It fails under 4.3.1. Help? Tim #include <boost/lambda/lambda.hpp> using boost::lambda::_1; template<typename Tcallback> void function(Tcallback callback) { (void)callback; } int main() { function(_1); // works function(_1+0); // fails return 0; } $ /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte//i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-g++ -W -Wall -o broken broken.cc -I/usr/include /usr/include/boost/lambda/detail/lambda_functors.hpp: In instantiation of 'boost::lambda::lambda_functor<boost::lambda::identity<const int>
': /usr/include/boost/lambda/detail/lambda_functor_base.hpp:164: instantiated from 'boost::lambda::detail::deduce_argument_types_<boost::tuples::cons<const int, boost::tuples::null_type>, boost::tuples::null_type>' /usr/include/boost/lambda/detail/lambda_functor_base.hpp:170: instantiated from 'boost::lambda::detail::deduce_argument_types_<boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1> , const int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::null_type>' /usr/include/boost/lambda/detail/lambda_functor_base.hpp:213: instantiated from 'boost::lambda::detail::deduce_argument_types<boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1> , const int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::null_type>' /usr/include/boost/lambda/detail/operator_lambda_func_base.hpp:60: instantiated from 'boost::lambda::detail::binary_rt<boost::lambda::arithmetic_action<boost::lambda::plus_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1> , const int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::tuples::null_type>' /usr/include/boost/lambda/detail/operator_lambda_func_base.hpp:206: instantiated from 'boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::plus_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1> , const int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> ::sig<boost::tuples::null_type>' /usr/include/boost/lambda/detail/lambda_functors.hpp:135: instantiated from 'boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::plus_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1> , const int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >' broken.cc:14: instantiated from here /usr/include/boost/lambda/detail/lambda_functors.hpp:137: warning: type qualifiers ignored on function return type