Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Lambda, boost::lambda::detail::return_type_deduction_failure?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-12-29 17:43:16


AMDG

stefys wrote:
> Hello, I've been trying to use Boost.Lambda in one of my simple
> applications, but I can't seem to get the following code to compile:
> for_each(vect.begin(), vect.end(), (var(str) +=
> _1+constant(string(", ")) ));
> Where vect is a std::vector<std::string> and str is a std::string. I
> have included these headers: <boost/lambda/lambda.hpp>, <vector>,
> <string>, <algorithm>.
> Here is the complete error I'm getting (using MSVC2005):
> c:\program
> files\boost\boost_1_36_0\boost\lambda\detail\operator_lambda_func_base.hpp(225)
> : error C2679: binary '+=' : no operator found which takes a
> right-hand operand of type
> 'boost::lambda::detail::return_type_deduction_failure<<unnamed-symbol>>'
> (or there is no acceptable conversion)
> <snip>

Boost.Lambda doesn't know about std::string.
See https://svn.boost.org/trac/boost/ticket/781

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net