summaryrefslogtreecommitdiff
path: root/test/catch_reference_nullptr.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/catch_reference_nullptr.pass.cpp')
-rw-r--r--test/catch_reference_nullptr.pass.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/catch_reference_nullptr.pass.cpp b/test/catch_reference_nullptr.pass.cpp
index 3ab520f..82a49df 100644
--- a/test/catch_reference_nullptr.pass.cpp
+++ b/test/catch_reference_nullptr.pass.cpp
@@ -12,12 +12,6 @@
#include <cassert>
#include <cstdlib>
-// Clang emits a warning on converting an object of type nullptr_t to bool,
-// even in generic code. Suppress it.
-#if defined(__clang__)
-#pragma clang diagnostic ignored "-Wnull-conversion"
-#endif
-
struct A {};
template<typename T, bool CanCatchNullptr>
@@ -25,7 +19,7 @@ static void catch_nullptr_test() {
try {
throw nullptr;
} catch (T &p) {
- assert(CanCatchNullptr && !p);
+ assert(CanCatchNullptr && !static_cast<bool>(p));
} catch (...) {
assert(!CanCatchNullptr);
}