Re: [Boost-bugs] [Boost C++ Libraries] #9578: Adapters (map_keys, map_values) cause undefined behavior (segv, etc) when applied to R-Values, especially in the context of BOOST_FOREACH

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9578: Adapters (map_keys, map_values) cause undefined behavior (segv, etc) when applied to R-Values, especially in the context of BOOST_FOREACH
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-03 14:59:12


#9578: Adapters (map_keys, map_values) cause undefined behavior (segv, etc) when
applied to R-Values, especially in the context of BOOST_FOREACH
-----------------------------------------+------------------------
  Reporter: Igor Lubashev <ilubashe@…> | Owner: neilgroves
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: range
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------------+------------------------

Comment (by ilubashe@…):

 I called out BOOST_FOREACH in filing the bug, because BOOST_FOREACH has
 the solution to a very similar problem it had to deal with.

 I would certainly not propose range adapter to copy values wholesale. The
 only values that need copying are r-values. In fact, I would be very
 surprised if there is ever a case when you do NOT want to copy an r-value
 in a range adapter. The l-values should certainly never be copied.

 BOOST_FOREACH has a way to tell which values are l-values and which are
 r-values.

 There is also a related bug: #7630

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