summaryrefslogtreecommitdiff
path: root/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-07-02 18:41:15 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-07-02 18:41:15 +0000
commit76b26852b6be6e54c86741c7c80ca6b5d74eab2e (patch)
tree59d55f14b2d3bd60b47dddd0642ebcfca0d95c1c /libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
parentf50ad6c311effee3bb70c3555fb6f6b0d59465b8 (diff)
Implement LWG 2946, 3075 and 3076. Reviewed as https://reviews.llvm.org/D48616
llvm-svn: 336132
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp')
-rw-r--r--libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
index f4ff0645afcf..a4de566a4dc0 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
@@ -20,11 +20,12 @@
#include "test_allocator.h"
template <class T>
-struct some_alloc
+struct throwing_alloc
{
typedef T value_type;
- some_alloc(const some_alloc&);
- ~some_alloc() noexcept(false);
+ throwing_alloc(const throwing_alloc&);
+ T *allocate(size_t);
+ ~throwing_alloc() noexcept(false);
};
// Test that it's possible to take the address of basic_string's destructors
@@ -44,7 +45,7 @@ int main()
}
#if defined(_LIBCPP_VERSION)
{
- typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
+ typedef std::basic_string<char, std::char_traits<char>, throwing_alloc<char>> C;
static_assert(!std::is_nothrow_destructible<C>::value, "");
}
#endif // _LIBCPP_VERSION