diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-11 02:47:36 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-11 02:47:36 +0000 |
commit | 3ca45664523ceef88a98df07ba0db922313f9ee8 (patch) | |
tree | f8445703b255f2aa6992230ff49b58fd6eeb5495 /libcxx/test/support/test_allocator.h | |
parent | e297b527a1f42c1a3269f04da13b3277c5b8abc3 (diff) | |
download | bcm5719-llvm-3ca45664523ceef88a98df07ba0db922313f9ee8.tar.gz bcm5719-llvm-3ca45664523ceef88a98df07ba0db922313f9ee8.zip |
Fix more uses of dynamic exception specifications in C++17
llvm-svn: 289356
Diffstat (limited to 'libcxx/test/support/test_allocator.h')
-rw-r--r-- | libcxx/test/support/test_allocator.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libcxx/test/support/test_allocator.h b/libcxx/test/support/test_allocator.h index 578b69ddc0b..04f15abf7fb 100644 --- a/libcxx/test/support/test_allocator.h +++ b/libcxx/test/support/test_allocator.h @@ -61,13 +61,13 @@ public: template <class U> struct rebind {typedef test_allocator<U> other;}; - test_allocator() throw() : data_(0) {++count;} - explicit test_allocator(int i) throw() : data_(i) {++count;} - test_allocator(const test_allocator& a) throw() + test_allocator() TEST_NOEXCEPT : data_(0) {++count;} + explicit test_allocator(int i) TEST_NOEXCEPT : data_(i) {++count;} + test_allocator(const test_allocator& a) TEST_NOEXCEPT : data_(a.data_) {++count;} - template <class U> test_allocator(const test_allocator<U>& a) throw() + template <class U> test_allocator(const test_allocator<U>& a) TEST_NOEXCEPT : data_(a.data_) {++count;} - ~test_allocator() throw() {assert(data_ >= 0); --count; data_ = -1;} + ~test_allocator() TEST_NOEXCEPT {assert(data_ >= 0); --count; data_ = -1;} pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} pointer allocate(size_type n, const void* = 0) @@ -86,7 +86,7 @@ public: } void deallocate(pointer p, size_type) {assert(data_ >= 0); --alloc_count; ::operator delete((void*)p);} - size_type max_size() const throw() + size_type max_size() const TEST_NOEXCEPT {return UINT_MAX / sizeof(T);} #if TEST_STD_VER < 11 void construct(pointer p, const T& val) @@ -122,13 +122,13 @@ public: template <class U> struct rebind {typedef non_default_test_allocator<U> other;}; -// non_default_test_allocator() throw() : data_(0) {++count;} - explicit non_default_test_allocator(int i) throw() : data_(i) {++count;} - non_default_test_allocator(const non_default_test_allocator& a) throw() +// non_default_test_allocator() TEST_NOEXCEPT : data_(0) {++count;} + explicit non_default_test_allocator(int i) TEST_NOEXCEPT : data_(i) {++count;} + non_default_test_allocator(const non_default_test_allocator& a) TEST_NOEXCEPT : data_(a.data_) {++count;} - template <class U> non_default_test_allocator(const non_default_test_allocator<U>& a) throw() + template <class U> non_default_test_allocator(const non_default_test_allocator<U>& a) TEST_NOEXCEPT : data_(a.data_) {++count;} - ~non_default_test_allocator() throw() {assert(data_ >= 0); --count; data_ = -1;} + ~non_default_test_allocator() TEST_NOEXCEPT {assert(data_ >= 0); --count; data_ = -1;} pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} pointer allocate(size_type n, const void* = 0) @@ -147,7 +147,7 @@ public: } void deallocate(pointer p, size_type) {assert(data_ >= 0); --alloc_count; ::operator delete((void*)p); } - size_type max_size() const throw() + size_type max_size() const TEST_NOEXCEPT {return UINT_MAX / sizeof(T);} #if TEST_STD_VER < 11 void construct(pointer p, const T& val) @@ -181,13 +181,13 @@ public: template <class U> struct rebind {typedef test_allocator<U> other;}; - test_allocator() throw() : data_(0) {} - explicit test_allocator(int i) throw() : data_(i) {} - test_allocator(const test_allocator& a) throw() + test_allocator() TEST_NOEXCEPT : data_(0) {} + explicit test_allocator(int i) TEST_NOEXCEPT : data_(i) {} + test_allocator(const test_allocator& a) TEST_NOEXCEPT : data_(a.data_) {} - template <class U> test_allocator(const test_allocator<U>& a) throw() + template <class U> test_allocator(const test_allocator<U>& a) TEST_NOEXCEPT : data_(a.data_) {} - ~test_allocator() throw() {data_ = -1;} + ~test_allocator() TEST_NOEXCEPT {data_ = -1;} friend bool operator==(const test_allocator& x, const test_allocator& y) {return x.data_ == y.data_;} |