Re: [Boost-bugs] [Boost C++ Libraries] #9742: for_each causes funny behavior in phoenix V3 expressions

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-04-02 23:30:23


#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 eric_niebler):

 It has something to do with the `phx::lambda`. The following does *not*
 exhibit the problem:

 {{{
 std::vector<int> v{1,2};
 boost::function<void(int)> fun = std::cout << arg1;
 (
   std::cout << phx::val("("),
   phx::for_each(arg1, fun),
   std::cout << phx::val(")")
 )(v);
 }}}

 I'd start by looking at what is special about phx expressions that have
 lambdas. Some transform is getting applied that is doing the wrong thing
 for comma operators or binary operators that are left-associative.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9742#comment:14>
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