Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8564: Variable hiding errors within nested let blocks in Phoenix
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-09 18:32:30
#8564: Variable hiding errors within nested let blocks in Phoenix
-------------------------------+---------------------
Reporter: miremare@⦠| Owner: theller
Type: Bugs | Status: new
Milestone: To Be Determined | Component: phoenix
Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------
Comment (by John Fletcher <J.P.Fletcher@â¦>):
Replying to [comment:2 John Fletcher <J.P.Fletcher@â¦>]:
> Further work has shown that these cases work as expected
> {{{
> {
> int z = 3;
> int y = 0;
> int x = (phoenix::let(_a = 1, _b = 2)[phoenix::let(_b = _a)[ _a
]])(y);
> }
> }}}
> {{{
> {
> int y = 0;
> int x = (phoenix::let(_a = 1, _b = 2)[phoenix::let(_b = _1)[ _a
]])(y);
> }
> }}}
> {{{
> {
> int y = 0;
> int x = (phoenix::let(_a = 1, _b = 2)[phoenix::let(_b = 1)[_b]])();
> } // This works....
> }}}
> but this case fails:
> {{{
> {
> int y = 0;
> int x = (phoenix::let(_a = 1, _b = 2)[phoenix::let(_b = 1)[_a]])();
> }
> }}}
> Reference to _a in the inner loop is the problem, but only when _b is
set to a constant!!
>
> Further investigation is in progress.
Unfortunately it is not as easy as that. The 'working' cases above fail
for some compilers e.g. clang 3.4 in C++03 but not C++11. gcc 4.8.2 works
for C++03 and C++11. Work is in progress.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8564#comment:3> 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