Browse Source

Use the noexcept specifier (C++11) instead of deprecated throw()

0.16
practicalswift 8 years ago
parent
commit
9862550260
  1. 8
      src/support/allocators/secure.h
  2. 8
      src/support/allocators/zeroafterfree.h

8
src/support/allocators/secure.h

@ -26,13 +26,13 @@ struct secure_allocator : public std::allocator<T> {
typedef typename base::reference reference; typedef typename base::reference reference;
typedef typename base::const_reference const_reference; typedef typename base::const_reference const_reference;
typedef typename base::value_type value_type; typedef typename base::value_type value_type;
secure_allocator() throw() {} secure_allocator() noexcept {}
secure_allocator(const secure_allocator& a) throw() : base(a) {} secure_allocator(const secure_allocator& a) noexcept : base(a) {}
template <typename U> template <typename U>
secure_allocator(const secure_allocator<U>& a) throw() : base(a) secure_allocator(const secure_allocator<U>& a) noexcept : base(a)
{ {
} }
~secure_allocator() throw() {} ~secure_allocator() noexcept {}
template <typename _Other> template <typename _Other>
struct rebind { struct rebind {
typedef secure_allocator<_Other> other; typedef secure_allocator<_Other> other;

8
src/support/allocators/zeroafterfree.h

@ -22,13 +22,13 @@ struct zero_after_free_allocator : public std::allocator<T> {
typedef typename base::reference reference; typedef typename base::reference reference;
typedef typename base::const_reference const_reference; typedef typename base::const_reference const_reference;
typedef typename base::value_type value_type; typedef typename base::value_type value_type;
zero_after_free_allocator() throw() {} zero_after_free_allocator() noexcept {}
zero_after_free_allocator(const zero_after_free_allocator& a) throw() : base(a) {} zero_after_free_allocator(const zero_after_free_allocator& a) noexcept : base(a) {}
template <typename U> template <typename U>
zero_after_free_allocator(const zero_after_free_allocator<U>& a) throw() : base(a) zero_after_free_allocator(const zero_after_free_allocator<U>& a) noexcept : base(a)
{ {
} }
~zero_after_free_allocator() throw() {} ~zero_after_free_allocator() noexcept {}
template <typename _Other> template <typename _Other>
struct rebind { struct rebind {
typedef zero_after_free_allocator<_Other> other; typedef zero_after_free_allocator<_Other> other;

Loading…
Cancel
Save