[Boost-bugs] [Boost C++ Libraries] #7885: Support references to range types as inputs to range metafunctions

Subject: [Boost-bugs] [Boost C++ Libraries] #7885: Support references to range types as inputs to range metafunctions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-01-11 17:31:47


#7885: Support references to range types as inputs to range metafunctions
------------------------------+---------------------------------------------
 Reporter: nathanridge | Owner: neilgroves
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: range
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 Range metafunctions like range_value, range_iterator etc. do not support
 referemces to range types as valid inputs - you must puss the range type
 without the reference.

 This was just fine in C++03 because references to range types came up in
 few generic contexts. In particular, if a template function took a range
 as a parameter, whether it took it by value (T), reference (T&), or const
 reference (const T&), T itself would be deduced to be the underlying range
 type without a reference.

 In C++11, however, if a template function takes a range by rvalue
 reference (T&&), T will be deduced to be a reference to a range type. As a
 result, if the author of this function wants to call a range metafunction
 on T, they have to first remove the reference using
 remove_reference<T>::type.

 It would be helpful if the range metafunctions accepted references to
 range types, and stripped the reference themselves.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7885>
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:11 UTC