aboutsummaryrefslogtreecommitdiff
path: root/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp')
-rw-r--r--test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
index 9411435e29e8..ab623bb01f78 100644
--- a/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
+++ b/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: libcpp-no-exceptions
// template <class charT>
// explicit bitset(const charT* str,
// typename basic_string<charT>::size_type n = basic_string<charT>::npos,
@@ -18,20 +17,19 @@
#include <algorithm> // for 'min' and 'max'
#include <stdexcept> // for 'invalid_argument'
-#pragma clang diagnostic ignored "-Wtautological-compare"
+#include "test_macros.h"
template <std::size_t N>
void test_char_pointer_ctor()
{
{
- try
- {
- std::bitset<N> v("xxx1010101010xxxx");
- assert(false);
- }
- catch (std::invalid_argument&)
- {
- }
+#ifndef TEST_HAS_NO_EXCEPTIONS
+ try {
+ std::bitset<N> v("xxx1010101010xxxx");
+ assert(false);
+ }
+ catch (std::invalid_argument&) {}
+#endif
}
{