summaryrefslogtreecommitdiff
path: root/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp')
-rw-r--r--test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp b/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
index f4ff0645afcf..a4de566a4dc0 100644
--- a/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp
+++ b/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