noexcept for Chapter 21 [strings].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132296 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/iterator b/include/iterator
index ec7a12b..6040eae 100644
--- a/include/iterator
+++ b/include/iterator
@@ -1007,35 +1007,35 @@
template <class _Iter1, class _Iter2>
bool
-operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
bool
-operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
bool
-operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
bool
-operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
bool
-operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
bool
-operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
typename __wrap_iter<_Iter1>::difference_type
-operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter>
__wrap_iter<_Iter>
-operator+(typename __wrap_iter<_Iter>::difference_type, const __wrap_iter<_Iter>&);
+operator+(typename __wrap_iter<_Iter>::difference_type, const __wrap_iter<_Iter>&) _NOEXCEPT;
template <class _I, class _O> _O copy(_I, _I, _O);
template <class _B1, class _B2> _B2 copy_backward(_B1, _B1, _B2);
@@ -1063,33 +1063,33 @@
private:
iterator_type __i;
public:
- _LIBCPP_INLINE_VISIBILITY __wrap_iter() {}
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter() _NOEXCEPT {}
template <class _Up> _LIBCPP_INLINE_VISIBILITY __wrap_iter(const __wrap_iter<_Up>& __u,
- typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = 0)
+ typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = 0) _NOEXCEPT
: __i(__u.base()) {}
- _LIBCPP_INLINE_VISIBILITY reference operator*() const {return *__i;}
- _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return &(operator*());}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator++() {++__i; return *this;}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter operator++(int)
+ _LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT {return *__i;}
+ _LIBCPP_INLINE_VISIBILITY pointer operator->() const _NOEXCEPT {return &(operator*());}
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator++() _NOEXCEPT {++__i; return *this;}
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter operator++(int) _NOEXCEPT
{__wrap_iter __tmp(*this); ++__i; return __tmp;}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator--() {--__i; return *this;}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter operator--(int)
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator--() _NOEXCEPT {--__i; return *this;}
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter operator--(int) _NOEXCEPT
{__wrap_iter __tmp(*this); --__i; return __tmp;}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter operator+ (difference_type __n) const
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter operator+ (difference_type __n) const _NOEXCEPT
{return __wrap_iter(__i + __n);}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator+=(difference_type __n)
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator+=(difference_type __n) _NOEXCEPT
{__i += __n; return *this;}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter operator- (difference_type __n) const
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter operator- (difference_type __n) const _NOEXCEPT
{return __wrap_iter(__i - __n);}
- _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator-=(difference_type __n)
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter& operator-=(difference_type __n) _NOEXCEPT
{__i -= __n; return *this;}
- _LIBCPP_INLINE_VISIBILITY reference operator[](difference_type __n) const
+ _LIBCPP_INLINE_VISIBILITY reference operator[](difference_type __n) const _NOEXCEPT
{return __i[__n];}
- _LIBCPP_INLINE_VISIBILITY iterator_type base() const {return __i;}
+ _LIBCPP_INLINE_VISIBILITY iterator_type base() const _NOEXCEPT {return __i;}
private:
- _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) : __i(__x) {}
+ _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
template <class _Up> friend class __wrap_iter;
template <class _CharT, class _Traits, class _Alloc> friend class basic_string;
@@ -1098,42 +1098,42 @@
template <class _Iter1, class _Iter2>
friend
bool
- operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator==(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
friend
bool
- operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator<(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
friend
bool
- operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator!=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
friend
bool
- operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator>(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
friend
bool
- operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator>=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
friend
bool
- operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator<=(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1, class _Iter2>
friend
typename __wrap_iter<_Iter1>::difference_type
- operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&);
+ operator-(const __wrap_iter<_Iter1>&, const __wrap_iter<_Iter2>&) _NOEXCEPT;
template <class _Iter1>
friend
__wrap_iter<_Iter1>
- operator+(typename __wrap_iter<_Iter1>::difference_type, const __wrap_iter<_Iter1>&);
+ operator+(typename __wrap_iter<_Iter1>::difference_type, const __wrap_iter<_Iter1>&) _NOEXCEPT;
template <class _I, class _O> friend _O copy(_I, _I, _O);
template <class _B1, class _B2> friend _B2 copy_backward(_B1, _B1, _B2);
@@ -1153,7 +1153,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() == __y.base();
}
@@ -1161,7 +1161,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() < __y.base();
}
@@ -1169,7 +1169,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() != __y.base();
}
@@ -1177,7 +1177,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() > __y.base();
}
@@ -1185,7 +1185,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() >= __y.base();
}
@@ -1193,7 +1193,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
bool
-operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() <= __y.base();
}
@@ -1201,7 +1201,7 @@
template <class _Iter1, class _Iter2>
inline _LIBCPP_INLINE_VISIBILITY
typename __wrap_iter<_Iter1>::difference_type
-operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y)
+operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
{
return __x.base() - __y.base();
}
@@ -1210,7 +1210,7 @@
inline _LIBCPP_INLINE_VISIBILITY
__wrap_iter<_Iter>
operator+(typename __wrap_iter<_Iter>::difference_type __n,
- const __wrap_iter<_Iter>& __x)
+ const __wrap_iter<_Iter>& __x) _NOEXCEPT
{
return __wrap_iter<_Iter>(__x.base() + __n);
}