summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-03-03 01:24:04 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-03-03 01:24:04 +0000
commit6a640a18a48e147a16b4f329f0f4e272e681a3e3 (patch)
tree71fe238911201661564bab7b83276505aee16399 /libcxx/include
parent925ec9b11e5856ec722aafa0ab7acd3303b03ee1 (diff)
downloadbcm5719-llvm-6a640a18a48e147a16b4f329f0f4e272e681a3e3.tar.gz
bcm5719-llvm-6a640a18a48e147a16b4f329f0f4e272e681a3e3.zip
Implement LWG Issue #2285 - make_reverse_iterator. Also mark issues #1450 and #2205 as complete; they are just wording changes in the standard. Mark issues #2359, #2320 and #2322 as complete - libc++ implements them already.
llvm-svn: 202671
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/iterator11
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/include/iterator b/libcxx/include/iterator
index b1bcdfc10b0..7bfd0498b32 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -138,6 +138,8 @@ template <class Iterator>
reverse_iterator<Iterator>
operator+(typename reverse_iterator<Iterator>::difference_type n, const reverse_iterator<Iterator>& x);
+template <class Iterator> reverse_iterator<Iterator> make_reverse_iterator(Iterator i); // C++14
+
template <class Container>
class back_insert_iterator
{
@@ -633,6 +635,15 @@ operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_i
return reverse_iterator<_Iter>(__x.base() - __n);
}
+#if _LIBCPP_STD_VER > 11
+template <class _Iter>
+inline _LIBCPP_INLINE_VISIBILITY
+reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
+{
+ return reverse_iterator<_Iter>(__i);
+}
+#endif
+
template <class _Container>
class _LIBCPP_TYPE_VIS_ONLY back_insert_iterator
: public iterator<output_iterator_tag,
OpenPOWER on IntegriCloud