From ff8b2a0acbc04ce894905a35c1f9e82a1fd2b8ce Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 14 May 2019 21:01:28 +0100 Subject: [PATCH] Fix NullablePointer test utility * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool): Fix return value. From-SVN: r271189 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/testsuite/util/testsuite_allocator.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 52cd3adfc8b..ecdba1d0756 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-05-14 Jonathan Wakely + + * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool): + Fix return value. + 2019-05-14 Rainer Orth * config/os/solaris/solaris2.10: Move to ... diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index ac7dc8ee2c4..d817ac4e838 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -600,7 +600,7 @@ namespace __gnu_test NullablePointer() = default; NullablePointer(std::nullptr_t) noexcept : value() { } - explicit operator bool() const noexcept { return value == nullptr; } + explicit operator bool() const noexcept { return value != nullptr; } friend inline bool operator==(NullablePointer lhs, NullablePointer rhs) noexcept -- 2.30.2