From: Jonathan Wakely Date: Tue, 14 May 2019 20:01:28 +0000 (+0100) Subject: Fix NullablePointer test utility X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff8b2a0acbc04ce894905a35c1f9e82a1fd2b8ce;p=gcc.git Fix NullablePointer test utility * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool): Fix return value. From-SVN: r271189 --- 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