Boost logo

Boost :

Subject: Re: [boost] lambda compile error
From: Andy Venikov (avenikov_at_[hidden])
Date: 2011-03-18 13:42:04


On 03/18/2011 01:36 PM, Steven Watanabe wrote:
>
> What's the error? It works for me with msvc 10 and the trunk.
>

OK, this one is rather long.
Sorry I couldn't prune since I'm not sure what's important and what's not.

In file included from /usr/include/boost/lambda/lambda.hpp:22:0,
                  from lock_prof.cpp:21:
/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp: In
member function ‘RET
boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
Args>::call(A&, B&, C&, Env&) const [with RET = std::multimap<int,
int>&, A = std::multimap<int, int>, B = const boost::tuples::null_type,
C = const boost::tuples::null_type, Env = const
boost::tuples::null_type, Args =
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >, const boost::arg<1>, 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_functors.hpp:175:50:
instantiated from ‘typename inherited::sig<boost::tuples::tuple<A&>
>::type boost::lambda::lambda_functor<Base>::operator()(A&) const [with
A = std::multimap<int, int>, T =
boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >, const boost::arg<1>, 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> >, typename
inherited::sig<boost::tuples::tuple<A&> >::type = std::multimap<int, int>&]’
lock_prof.cpp:196:24: instantiated from here
/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp:237:1:
error: no match for ‘operator=’ in ‘boost::lambda::detail::select [with
Arg = boost::lambda::identity<std::multimap<int, int>&>, A =
std::multimap<int, int>, B = const boost::tuples::null_type, C = const
boost::tuples::null_type, Env = const boost::tuples::null_type, typename
Arg::sig<boost::tuples::tuple<A&, B&, C&, Env&> >::type =
std::multimap<int, int>&](((const
boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >&)((const
boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >*)boost::tuples::get [with int N = 0, HT =
boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >, TT = boost::tuples::cons<const boost::arg<1>,
boost::tuples::null_type>, typename
boost::tuples::access_traits<typename boost::tuples::element<N,
boost::tuples::cons<HT, TT> >::type>::const_type = const
boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >&](((const
boost::tuples::cons<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >, boost::tuples::cons<const boost::arg<1>,
boost::tuples::null_type> >&)(&((const
boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int,
int>&> >, const boost::arg<1>, 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>
>*)this)->boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, const boost::arg<1>, 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> >::args.boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, const boost::arg<1>, 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>::<anonymous>))))), ((std::multimap<int, int>&)((std::multimap<int, int>*)a)), ((const boost::tuples::null_type&)((const boost::tuples::null_type*)b)), ((const boost::tuples::null_type&)((const boost::tuples:
:null_type*)c)), ((const boost::tuples::null_type&)((const boost::tuples::null_type*)env))) = boost::lambda::detail::select [with Any = const boost::arg<1>, A = std::multimap<int, int>, B = const boost::tuples::null_type, C = const boost::tuples::null_type, Env = const boost::tuples::null_type](((const boost::arg<1>&)((const boost::arg<1>*)boost::tuples::get [with int N = 1, HT = boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, TT = boost::tuples::cons<const boost::arg<1>, boost::tuples::null_type>, typename boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::const_type = const boost::arg<1>&](((const boost::tuples::cons<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, boost::tuples::cons<const boost::arg<1>, boost::tuples::null_type> >&)(&((const boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>, boost::tuples::t
uple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, const boost::arg<1>, 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> >*)this)->boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, const boost::arg<1>, 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> >::args.boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::identity<std::multimap<int, int>&> >, const boost::arg<1>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_t
ype, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>::<anonymous>))))), ((std::multimap<int, int>&)((std::multimap<int, int>*)a)), ((const boost::tuples::null_type&)((const boost::tuples::null_type*)b)), ((const boost::tuples::null_type&)((const boost::tuples::null_type*)c)), ((const boost::tuples::null_type&)((const boost::tuples::null_type*)env)))’
/usr/include/c++/4.5/bits/stl_multimap.h:248:7: note: candidate is:
std::multimap<_Key, _Tp, _Compare, _Alloc>& std::multimap<_Key, _Tp,
_Compare, _Alloc>::operator=(const std::multimap<_Key, _Tp, _Compare,
_Alloc>&) [with _Key = int, _Tp = int, _Compare = std::less<int>, _Alloc
= std::allocator<std::pair<const int, int> >, std::multimap<_Key, _Tp,
_Compare, _Alloc> = std::multimap<int, int>]
make: *** [lock_prof.o] Error 1


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk