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:33:05


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

 Yes you would, but I have no solution for this. It seems to me to be a
 lifetime issue that is not fixable without enormous detrimental impact on
 other code. I closed the ticket not due to unwillingness to alter the
 code, but due to having no good solution. If we alter the semantics to
 require copying this has huge impact on some ranges. If we automatically
 move this would either require large performance overhead due to bloated
 adapters and would alter the semantic to have other surprising features.

 I'll see if you or anyone else have any suggestions for what you actually
 would like done. AFAICT it simply is a general C++ issue. You have to be
 careful with lifetimes. Of course if there is a solution I have overlooked
 that can make things better with little impact on other cases I would jump
 at it immediately.

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