summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/profile
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-05-18 18:05:17 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-05-18 18:05:17 +0000
commit5d861bf2cb8d21efd5f87f03150ab8e20f4e1155 (patch)
treec4f14d8b7b1e6ae132811f82b60a35dab51be8bb /libstdc++-v3/include/profile
parent0bda47a37afb63ee0162ea39ded62305469eed7d (diff)
downloadgcc-5d861bf2cb8d21efd5f87f03150ab8e20f4e1155.tar.gz
initializer_list: Use noexcept specifier.
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. From-SVN: r173871
Diffstat (limited to 'libstdc++-v3/include/profile')
-rw-r--r--libstdc++-v3/include/profile/bitset61
1 files changed, 33 insertions, 28 deletions
diff --git a/libstdc++-v3/include/profile/bitset b/libstdc++-v3/include/profile/bitset
index a995afa9723..bd4aa3e152f 100644
--- a/libstdc++-v3/include/profile/bitset
+++ b/libstdc++-v3/include/profile/bitset
@@ -1,6 +1,6 @@
// Profiling bitset implementation -*- C++ -*-
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -52,42 +52,42 @@ namespace __profile
friend class bitset;
reference();
- reference(const _Base_ref& __base, bitset* __seq)
+ reference(const _Base_ref& __base, bitset* __seq) _GLIBCXX_NOEXCEPT
: _Base_ref(__base)
{ }
public:
- reference(const reference& __x)
+ reference(const reference& __x) _GLIBCXX_NOEXCEPT
: _Base_ref(__x)
{ }
reference&
- operator=(bool __x)
+ operator=(bool __x) _GLIBCXX_NOEXCEPT
{
*static_cast<_Base_ref*>(this) = __x;
return *this;
}
reference&
- operator=(const reference& __x)
+ operator=(const reference& __x) _GLIBCXX_NOEXCEPT
{
*static_cast<_Base_ref*>(this) = __x;
return *this;
}
bool
- operator~() const
+ operator~() const _GLIBCXX_NOEXCEPT
{
return ~(*static_cast<const _Base_ref*>(this));
}
- operator bool() const
+ operator bool() const _GLIBCXX_NOEXCEPT
{
return *static_cast<const _Base_ref*>(this);
}
reference&
- flip()
+ flip() _GLIBCXX_NOEXCEPT
{
_Base_ref::flip();
return *this;
@@ -95,10 +95,11 @@ namespace __profile
};
// 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
@@ -138,42 +139,42 @@ namespace __profile
// 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;
@@ -189,7 +190,7 @@ namespace __profile
}
bitset<_Nb>&
- reset()
+ reset() _GLIBCXX_NOEXCEPT
{
_Base::reset();
return *this;
@@ -202,10 +203,12 @@ namespace __profile
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;
@@ -305,11 +308,11 @@ namespace __profile
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;
@@ -318,33 +321,35 @@ namespace __profile
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; }
+ _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>