summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-10-02 19:45:42 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-10-02 19:45:42 +0000
commit6e551ae1a30e6ea2fe3be4332af6f58771cd5e20 (patch)
tree8924466c424ec01b5e82cbf3c5baff2a7805cf91 /libcxx
parent6c3890b680edf71fe878da7406e2169179dcddae (diff)
downloadbcm5719-llvm-6e551ae1a30e6ea2fe3be4332af6f58771cd5e20.tar.gz
bcm5719-llvm-6e551ae1a30e6ea2fe3be4332af6f58771cd5e20.zip
Make vector::iterator and string::iterator more resilient against overly generic relational operators.
llvm-svn: 165033
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/iterator32
1 files changed, 32 insertions, 0 deletions
diff --git a/libcxx/include/iterator b/libcxx/include/iterator
index 9b6560880af..5747504a35b 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -1301,6 +1301,38 @@ operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEX
return !(__y < __x);
}
+template <class _Iter1>
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
+{
+ return !(__x == __y);
+}
+
+template <class _Iter1>
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
+{
+ return __y < __x;
+}
+
+template <class _Iter1>
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
+{
+ return !(__x < __y);
+}
+
+template <class _Iter1>
+inline _LIBCPP_INLINE_VISIBILITY
+bool
+operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
+{
+ return !(__y < __x);
+}
+
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
typename __wrap_iter<_Iter1>::difference_type
OpenPOWER on IntegriCloud