diff options
author | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-25 20:28:12 +0000 |
---|---|---|
committer | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-25 20:28:12 +0000 |
commit | 7ccd2a7d20d56efd94ddfd2b2d8c0b7f8fddeedc (patch) | |
tree | a5d221343e52f69d052714dac7cf2f8977c62245 /libstdc++-v3/include/profile | |
parent | aa5031a041b19c0f65314d158fae0ff5a7aa174a (diff) | |
download | gcc-7ccd2a7d20d56efd94ddfd2b2d8c0b7f8fddeedc.tar.gz |
2013-09-25 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/58338
* include/bits/forward_list.h (_Fwd_list_node_base::_M_transfer_after):
Mark as noexcept.
(_Fwd_list_iterator) [_Fwd_list_iterator, operator*, operator->,
operator++, operator==, operator!=, _M_next]: Likewise.
(_Fwd_list_const_iterator) [_Fwd_list_const_iterator, operator*,
operator->, operator++, operator==, operator!=, _M_next]: Likewise.
(operator==(const _Fwd_list_iterator&, const _Fwd_list_const_iterator&),
operator!=(const _Fwd_list_iterator&, const _Fwd_list_const_iterator&)):
Likewise.
* include/bits/hashtable_policy.h (_Hash_node_base::_Hash_node_base,
_Hash_node::_M_next, _Node_iterator_base::_Node_iterator_base,
_Node_iterator_base::_M_incr, operator==(const _Node_iterator_base&,
const _Node_iterator_base&), operator!=(const _Node_iterator_base&,
const _Node_iterator_base&)): Likewise.
(_Node_iterator) [_Node_iterator, operator*, operator->, operator++]:
Likewise.
(_Node_const_iterator) [_Node_const_iterator, operator*, operator->,
operator++]: Likewise.
* include/debug/safe_iterator.h (_Safe_iterator) [_Safe_iterator,
operator=, operator*, operator->, operator++, operator--, operator[],
operator+=, operator+, operator-=, operator-, base, operator _Iterator]:
Likewise.
(operator==(const _Safe_iterator&, const _Safe_iterator&),
operator!=(const _Safe_iterator&, const _Safe_iterator&),
operator<(const _Safe_iterator&, const _Safe_iterator&),
operator<=(const _Safe_iterator&, const _Safe_iterator&),
operator>(const _Safe_iterator&, const _Safe_iterator&),
operator>=(const _Safe_iterator&, const _Safe_iterator&),
operator-(const _Safe_iterator&, const _Safe_iterator&),
operator+(difference_type, const _Safe_iterator&)): Likewise.
* include/profile/iterator_tracker.h (__iterator_tracker)
[__iterator_tracker, base, operator _Iterator, operator->, operator++,
operator--, operator=, operator*, operator[], operator+=, operator+,
operator-=, operator-]: Likewise.
(operator==(const __iterator_tracker&, const __iterator_tracker&),
operator!=(const __iterator_tracker&, const __iterator_tracker&),
operator<(const __iterator_tracker&, const __iterator_tracker&),
operator<=(const __iterator_tracker&, const __iterator_tracker&),
operator>(const __iterator_tracker&, const __iterator_tracker&),
operator>=(const __iterator_tracker&, const __iterator_tracker&),
operator-(const __iterator_tracker&, const __iterator_tracker&),
operator+(difference_type, const __iterator_tracker&)): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202924 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/profile')
-rw-r--r-- | libstdc++-v3/include/profile/iterator_tracker.h | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/libstdc++-v3/include/profile/iterator_tracker.h b/libstdc++-v3/include/profile/iterator_tracker.h index 251eff7355f..c016f20db8b 100644 --- a/libstdc++-v3/include/profile/iterator_tracker.h +++ b/libstdc++-v3/include/profile/iterator_tracker.h @@ -56,13 +56,14 @@ namespace __profile typedef typename _Traits::reference reference; typedef typename _Traits::pointer pointer; - __iterator_tracker() + __iterator_tracker() _GLIBCXX_NOEXCEPT : _M_current(), _M_ds(0) { } - __iterator_tracker(const _Iterator& __i, const _Sequence* __seq) + __iterator_tracker(const _Iterator& __i, const _Sequence* __seq) + _GLIBCXX_NOEXCEPT : _M_current(__i), _M_ds(__seq) { } - __iterator_tracker(const __iterator_tracker& __x) + __iterator_tracker(const __iterator_tracker& __x) _GLIBCXX_NOEXCEPT : _M_current(__x._M_current), _M_ds(__x._M_ds) { } template<typename _MutableIterator> @@ -70,23 +71,23 @@ namespace __profile typename __gnu_cxx::__enable_if <(std::__are_same<_MutableIterator, typename _Sequence::iterator::_Base_iterator>::__value), - _Sequence>::__type>& __x) + _Sequence>::__type>& __x) _GLIBCXX_NOEXCEPT : _M_current(__x.base()), _M_ds(__x._M_get_sequence()) { } _Iterator - base() const { return _M_current; } + base() const _GLIBCXX_NOEXCEPT { return _M_current; } /** * @brief Conversion to underlying non-debug iterator to allow * better interaction with non-profile containers. */ - operator _Iterator() const { return _M_current; } + operator _Iterator() const _GLIBCXX_NOEXCEPT { return _M_current; } pointer - operator->() const { return &*_M_current; } + operator->() const _GLIBCXX_NOEXCEPT { return &*_M_current; } __iterator_tracker& - operator++() + operator++() _GLIBCXX_NOEXCEPT { _M_ds->_M_profile_iterate(); ++_M_current; @@ -94,7 +95,7 @@ namespace __profile } __iterator_tracker - operator++(int) + operator++(int) _GLIBCXX_NOEXCEPT { _M_ds->_M_profile_iterate(); __iterator_tracker __tmp(*this); @@ -103,7 +104,7 @@ namespace __profile } __iterator_tracker& - operator--() + operator--() _GLIBCXX_NOEXCEPT { _M_ds->_M_profile_iterate(1); --_M_current; @@ -111,7 +112,7 @@ namespace __profile } __iterator_tracker - operator--(int) + operator--(int) _GLIBCXX_NOEXCEPT { _M_ds->_M_profile_iterate(1); __iterator_tracker __tmp(*this); @@ -120,30 +121,30 @@ namespace __profile } __iterator_tracker& - operator=(const __iterator_tracker& __x) + operator=(const __iterator_tracker& __x) _GLIBCXX_NOEXCEPT { _M_current = __x._M_current; return *this; } reference - operator*() const + operator*() const _GLIBCXX_NOEXCEPT { return *_M_current; } // ------ Random access iterator requirements ------ reference - operator[](const difference_type& __n) const + operator[](const difference_type& __n) const _GLIBCXX_NOEXCEPT { return _M_current[__n]; } __iterator_tracker& - operator+=(const difference_type& __n) + operator+=(const difference_type& __n) _GLIBCXX_NOEXCEPT { _M_current += __n; return *this; } __iterator_tracker - operator+(const difference_type& __n) const + operator+(const difference_type& __n) const _GLIBCXX_NOEXCEPT { __iterator_tracker __tmp(*this); __tmp += __n; @@ -151,14 +152,14 @@ namespace __profile } __iterator_tracker& - operator-=(const difference_type& __n) + operator-=(const difference_type& __n) _GLIBCXX_NOEXCEPT { _M_current += -__n; return *this; } __iterator_tracker - operator-(const difference_type& __n) const + operator-(const difference_type& __n) const _GLIBCXX_NOEXCEPT { __iterator_tracker __tmp(*this); __tmp -= __n; @@ -178,72 +179,84 @@ namespace __profile inline bool operator==(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() == __rhs.base(); } template<typename _Iterator, typename _Sequence> inline bool operator==(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() == __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Sequence> inline bool operator!=(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() != __rhs.base(); } template<typename _Iterator, typename _Sequence> inline bool operator!=(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() != __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Sequence> inline bool operator<(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() < __rhs.base(); } template<typename _Iterator, typename _Sequence> inline bool operator<(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() < __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Sequence> inline bool operator<=(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() <= __rhs.base(); } template<typename _Iterator, typename _Sequence> inline bool operator<=(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() <= __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Sequence> inline bool operator>(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() > __rhs.base(); } template<typename _Iterator, typename _Sequence> inline bool operator>(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() > __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Sequence> inline bool operator>=(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() >= __rhs.base(); } template<typename _Iterator, typename _Sequence> inline bool operator>=(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() >= __rhs.base(); } // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -254,12 +267,14 @@ namespace __profile inline typename __iterator_tracker<_IteratorL, _Sequence>::difference_type operator-(const __iterator_tracker<_IteratorL, _Sequence>& __lhs, const __iterator_tracker<_IteratorR, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() - __rhs.base(); } template<typename _Iterator, typename _Sequence> inline typename __iterator_tracker<_Iterator, _Sequence>::difference_type operator-(const __iterator_tracker<_Iterator, _Sequence>& __lhs, const __iterator_tracker<_Iterator, _Sequence>& __rhs) + _GLIBCXX_NOEXCEPT { return __lhs.base() - __rhs.base(); } template<typename _Iterator, typename _Sequence> @@ -267,6 +282,7 @@ namespace __profile operator+(typename __iterator_tracker<_Iterator,_Sequence>::difference_type __n, const __iterator_tracker<_Iterator, _Sequence>& __i) + _GLIBCXX_NOEXCEPT { return __i + __n; } } // namespace __profile |