Subject: [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-05 08:06:53
#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
Keywords: phoenix,for_each,lazy |
-----------------------------------+---------------------
Using phoenix::for_each in a Phoenix expression produces a strange
behavior, which seems to be reverse execution of the comma-separated
expressions.
This does NOT happen when you include Phoenix V2 from the spirit
directory.
Sample Code: (Full code attached)
{{{
std::vector<int> v{1,2};
(std::cout << phx::val("("), phx::for_each(arg1, phx::lambda[std::cout <<
arg1]), std::cout << phx::val(")"))(v);
}}}
This originally showed up for me when using phoenix expressions in spirit
semantic actions, discussed here:
http://boost.2283326.n4.nabble.com/Phoenix-V3-for-each-or-lambda-seem-to-
be-ruining-qi-semantic-actions-tp4659691.html
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9742> 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