lambda code fails to compile on g++ 4.3.1

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

On Tue, Dec 16, 2008 at 9:22 AM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
Tim Hockin wrote:
This code builds and runs under g++ 4.2.2. It fails under 4.3.1. Help?
<snip>
Fails? I only see warnings, not errors.
Sorry, yes. I always build with -Werror so I don't miss anything. I don't see why it should be issuing a warning, though.
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- You know what I hate about people who criticize you? They criticize what you say, but they never give you credit for how loud you say it. -- Stephen Colbert to Bill O'Reilly

On Tue, Dec 16, 2008 at 9:58 AM, Tim Hockin <thockin@hockin.org> wrote:
On Tue, Dec 16, 2008 at 9:22 AM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
Tim Hockin wrote:
This code builds and runs under g++ 4.2.2. It fails under 4.3.1. Help?
<snip>
Fails? I only see warnings, not errors.
Sorry, yes. I always build with -Werror so I don't miss anything. I don't see why it should be issuing a warning, though.
Anyone who can help detangle this one?
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- You know what I hate about people who criticize you? They criticize what you say, but they never give you credit for how loud you say it.
-- Stephen Colbert to Bill O'Reilly
-- You know what I hate about people who criticize you? They criticize what you say, but they never give you credit for how loud you say it. -- Stephen Colbert to Bill O'Reilly
participants (2)
-
Steven Watanabe
-
Tim Hockin