Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9742: for_each causes funny behavior in phoenix V3 expressions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-16 10:19:11
#9742: for_each causes funny behavior in phoenix V3 expressions
-------------------------------+-----------------------------------
Reporter: Chromatix | Owner: theller
Type: Bugs | Status: new
Milestone: To Be Determined | Component: phoenix
Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords: phoenix,for_each,lazy
-------------------------------+-----------------------------------
Comment (by John Fletcher <J.P.Fletcher@â¦>):
With further testing I have shown that the following code does NOT show
the error with gcc 4.6 and gcc 4.8.2. Clang 3.4 also works.
{{{
#include <sstream>
std::ostringstream out;
(
out << phx::val("("),
phx::for_each(arg1, phx::lambda[out << arg1]),
out << phx::val(")")
)(v);
std::cout << out.str() << std::endl;
}}}
I don't have an explanation for why it doesn't work with {{{std::cout}}}.
Would you please test with MSVC and see if this works for that as well.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9742#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC