diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-18 18:05:17 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-18 18:05:17 +0000 |
| commit | 7643295e308e56004ef614067bcab311299c371d (patch) | |
| tree | c4f14d8b7b1e6ae132811f82b60a35dab51be8bb /libstdc++-v3/include/debug/bitset | |
| parent | b26e9e379ac76f57687f7840903f0aec48087c45 (diff) | |
| download | ppe42-gcc-7643295e308e56004ef614067bcab311299c371d.tar.gz ppe42-gcc-7643295e308e56004ef614067bcab311299c371d.zip | |
2011-05-18 Paolo Carlini <paolo.carlini@oracle.com>
* libsupc++/initializer_list: Use noexcept specifier.
(initializer_list<>::size, begin, end): Qualify as const.
* include/bits/move.h (__addressof, forward, move, addressof): Specify
as noexcept.
* include/std/bitset: Use noexcept specifier throughout.
* include/debug/bitset: Update.
* include/profile/bitset: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173871 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/bitset')
| -rw-r--r-- | libstdc++-v3/include/debug/bitset | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/libstdc++-v3/include/debug/bitset b/libstdc++-v3/include/debug/bitset index c1875454255..21d281787ad 100644 --- a/libstdc++-v3/include/debug/bitset +++ b/libstdc++-v3/include/debug/bitset @@ -1,6 +1,6 @@ // Debugging bitset implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -66,19 +66,19 @@ namespace __debug reference(); reference(const _Base_ref& __base, - bitset* __seq __attribute__((__unused__))) + bitset* __seq __attribute__((__unused__))) _GLIBCXX_NOEXCEPT : _Base_ref(__base) , _Safe_iterator_base(__seq, false) { } public: - reference(const reference& __x) + reference(const reference& __x) _GLIBCXX_NOEXCEPT : _Base_ref(__x) , _Safe_iterator_base(__x, false) { } reference& - operator=(bool __x) + operator=(bool __x) _GLIBCXX_NOEXCEPT { _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_write) @@ -88,7 +88,7 @@ namespace __debug } reference& - operator=(const reference& __x) + operator=(const reference& __x) _GLIBCXX_NOEXCEPT { _GLIBCXX_DEBUG_VERIFY(! __x._M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_read) @@ -101,7 +101,7 @@ namespace __debug } bool - operator~() const + operator~() const _GLIBCXX_NOEXCEPT { _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_read) @@ -109,7 +109,7 @@ namespace __debug return ~(*static_cast<const _Base_ref*>(this)); } - operator bool() const + operator bool() const _GLIBCXX_NOEXCEPT { _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_read) @@ -118,7 +118,7 @@ namespace __debug } reference& - flip() + flip() _GLIBCXX_NOEXCEPT { _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(), _M_message(__gnu_debug::__msg_bad_bitset_flip) @@ -130,10 +130,11 @@ namespace __debug #endif // 23.3.5.1 constructors: - _GLIBCXX_CONSTEXPR bitset() : _Base() { } + _GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT + : _Base() { } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - constexpr bitset(unsigned long long __val) + constexpr bitset(unsigned long long __val) noexcept #else bitset(unsigned long __val) #endif @@ -173,42 +174,42 @@ namespace __debug // 23.3.5.2 bitset operations: bitset<_Nb>& - operator&=(const bitset<_Nb>& __rhs) + operator&=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT { _M_base() &= __rhs; return *this; } bitset<_Nb>& - operator|=(const bitset<_Nb>& __rhs) + operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT { _M_base() |= __rhs; return *this; } bitset<_Nb>& - operator^=(const bitset<_Nb>& __rhs) + operator^=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT { _M_base() ^= __rhs; return *this; } bitset<_Nb>& - operator<<=(size_t __pos) + operator<<=(size_t __pos) _GLIBCXX_NOEXCEPT { _M_base() <<= __pos; return *this; } bitset<_Nb>& - operator>>=(size_t __pos) + operator>>=(size_t __pos) _GLIBCXX_NOEXCEPT { _M_base() >>= __pos; return *this; } bitset<_Nb>& - set() + set() _GLIBCXX_NOEXCEPT { _Base::set(); return *this; @@ -224,7 +225,7 @@ namespace __debug } bitset<_Nb>& - reset() + reset() _GLIBCXX_NOEXCEPT { _Base::reset(); return *this; @@ -237,10 +238,12 @@ namespace __debug return *this; } - bitset<_Nb> operator~() const { return bitset(~_M_base()); } + bitset<_Nb> + operator~() const _GLIBCXX_NOEXCEPT + { return bitset(~_M_base()); } bitset<_Nb>& - flip() + flip() _GLIBCXX_NOEXCEPT { _Base::flip(); return *this; @@ -346,11 +349,11 @@ namespace __debug using _Base::size; bool - operator==(const bitset<_Nb>& __rhs) const + operator==(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT { return _M_base() == __rhs; } bool - operator!=(const bitset<_Nb>& __rhs) const + operator!=(const bitset<_Nb>& __rhs) const _GLIBCXX_NOEXCEPT { return _M_base() != __rhs; } using _Base::test; @@ -359,33 +362,35 @@ namespace __debug using _Base::none; bitset<_Nb> - operator<<(size_t __pos) const + operator<<(size_t __pos) const _GLIBCXX_NOEXCEPT { return bitset<_Nb>(_M_base() << __pos); } bitset<_Nb> - operator>>(size_t __pos) const + operator>>(size_t __pos) const _GLIBCXX_NOEXCEPT { return bitset<_Nb>(_M_base() >> __pos); } - _Base& - _M_base() { return *this; } + _Base& + _M_base() _GLIBCXX_NOEXCEPT + { return *this; } const _Base& - _M_base() const { return *this; } + _M_base() const _GLIBCXX_NOEXCEPT + { return *this; } }; template<size_t _Nb> bitset<_Nb> - operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) + operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT { return bitset<_Nb>(__x) &= __y; } template<size_t _Nb> bitset<_Nb> - operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) + operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT { return bitset<_Nb>(__x) |= __y; } template<size_t _Nb> bitset<_Nb> - operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) + operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT { return bitset<_Nb>(__x) ^= __y; } template<typename _CharT, typename _Traits, size_t _Nb> |

