Subject: [Boost-bugs] [Boost C++ Libraries] #10789: unexpected behaviour with boost range join on rvalue
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-13 07:05:06
#10789: unexpected behaviour with boost range join on rvalue
-----------------------------------+------------------------
Reporter: Matei David <matei@â¦> | Owner: neilgroves
Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.57.0 | Severity: Problem
Keywords: |
-----------------------------------+------------------------
I'm trying to append one element to a range, and iterate over the
resulting compound range. When the rhs of the `join` is an lvalue,
everything seems ok. However, when the rhs of the `join` is an rvalue, I'm
seeing something unexpected.
Specifically, when such a joined range is accessed directly by a `for(auto
e : range)` loop, or when it is saved in a variable using `auto`, then
iterated over, the singleton in the second container is not produced
correctly. If however the joined range is passed by reference (other than
non-const lvalue, obviously), then iterated over, the result is correct.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10789> 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:17 UTC