Re: [Boost-bugs] [Boost C++ Libraries] #8668: BOOST_FOREACH breaks on clang 3.2 but not on gcc 4.7.2

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8668: BOOST_FOREACH breaks on clang 3.2 but not on gcc 4.7.2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-23 05:40:19


#8668: BOOST_FOREACH breaks on clang 3.2 but not on gcc 4.7.2
-------------------------------+--------------------------
  Reporter: juxeii@… | Owner: eric_niebler
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: foreach
   Version: Boost 1.52.0 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------+--------------------------
Changes (by eric_niebler):

 * status: new => closed
 * resolution: => wontfix

Comment:

 It's not really a bug in gcc, clang, or boost. It's because in C++03,
 there's no perfect way to tell rvalues from lvalues. `BOOST_FOREACH` jumps
 through hoops of fire to figure it out, and it gets it right %100 of the
 time, +/- some epsilon. Congrats, you've found the epsilon. ;-)

 If your container has an unconstrained conversion operator template, like
 `A` does above, it's not going to work. I think clang is right to reject
 it. The workaround is to compile with `-std=gnu++11` or use C++11's range-
 based `for` loop. I'm afraid there's no way I know to make this work in
 C++03.

 I encourage you to migrate to C++11. `BOOST_FOREACH` is legacy.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8668#comment:2>
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:13 UTC