From 53a420fba21cf1644972b34dcd811a43cdb8368d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:18:58 +0000 Subject: Vendor import of libc++ trunk r290819: https://llvm.org/svn/llvm-project/libcxx/trunk@290819 --- test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp') 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 c4ac1f1a47bb..0c6362d96863 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 @@ -16,6 +16,7 @@ #include #include +#include "test_macros.h" #include "test_allocator.h" template @@ -26,6 +27,11 @@ struct some_alloc ~some_alloc() noexcept(false); }; +// Test that it's possible to take the address of basic_string's destructors +// by creating globals which will register their destructors with cxa_atexit. +std::string s; +std::wstring ws; + int main() { { @@ -38,6 +44,6 @@ int main() } { typedef std::basic_string, some_alloc> C; - static_assert(!std::is_nothrow_destructible::value, ""); + LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible::value, ""); } } -- cgit v1.3