Implement LWG issue 2306: match_results::reference should be value_type&, not const value_type&. This is a general move by the LWG to have the reference type of read-only containers be a non-const reference; however, there are no methods that return a non-const reference to a match_result entry, so there's no worries about getting a non-const reference to a constant object.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -437,7 +437,7 @@ class match_results
|
||||
public:
|
||||
typedef sub_match<BidirectionalIterator> value_type;
|
||||
typedef const value_type& const_reference;
|
||||
typedef const_reference reference;
|
||||
typedef value_type& reference;
|
||||
typedef /implementation-defined/ const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
@@ -5263,7 +5263,7 @@ private:
|
||||
public:
|
||||
_BidirectionalIterator __position_start_;
|
||||
typedef const value_type& const_reference;
|
||||
typedef const_reference reference;
|
||||
typedef value_type& reference;
|
||||
typedef typename __container_type::const_iterator const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
|
||||
|
Reference in New Issue
Block a user