summaryrefslogtreecommitdiffstats
path: root/libcxx/include/regex
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-02-26 01:56:31 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-02-26 01:56:31 +0000
commit16da3240517366168e9d0618eff2d8ce957024df (patch)
tree8f8d3367a4fd812101a11aed1049f591419a3c12 /libcxx/include/regex
parent0c12b1d23c3db414288420c963d28e6cca53a1d5 (diff)
downloadbcm5719-llvm-16da3240517366168e9d0618eff2d8ce957024df.tar.gz
bcm5719-llvm-16da3240517366168e9d0618eff2d8ce957024df.zip
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.
llvm-svn: 202214
Diffstat (limited to 'libcxx/include/regex')
-rw-r--r--libcxx/include/regex4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index e121738a9b5..26ade48baf7 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -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;
OpenPOWER on IntegriCloud