id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13357,boost::iterator_range>::back() returns reference to temporary,Mikołaj Milej ,Neil Groves,"boost::iterator_range>::back() returns reference to temporary it's created by {{{ using RangeRawType = std::uint64_t; inline Range makeRange( RangeRawType begin, RangeRawType end = std::numeric_limits::max()) { return boost::counting_range(begin, end); } }}} After investigation code of back() it probably returns reference to temporary value: {{{ reference back() const { BOOST_ASSERT(!this->empty()); return *boost::prior(this->m_End); } }}} So it returns just a junk (or rather this reference points to some random data). Code is the same in the newest boost (1.66 at time of writing). ",Bugs,new,To Be Determined,range,Boost 1.61.0,Problem,,range,