Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8483: Fix for reference type deduction in join_iterator.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-19 15:07:24
#8483: Fix for reference type deduction in join_iterator.hpp
-------------------------------+---------------------------
Reporter: stheophil@⦠| Owner: neilgroves
Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords: join_iterator
-------------------------------+---------------------------
Comment (by stheophil@â¦):
I'm sorry it took so long for me to respond. The problem is easy to
replicate:
{{{
typedef boost::join_iterator<
std::vector<int>::const_iterator,
std::vector<int>::iterator
> JoinIterator;
static_assert( std::is_same<
typename JoinIterator::reference,
int const&
>::value, "" );
}}}
The static_assert should not trigger but it does with the old
implementation of join_iterator (using Visual Studio 2012). add_const<
int& >::type is still int&. We need to remove the reference first, then
add const then re-add the reference. (Or find an altogether better
solution :-)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8483#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