Fix NullablePointer test utility
authorJonathan Wakely <jwakely@redhat.com>
Tue, 14 May 2019 20:01:28 +0000 (21:01 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 14 May 2019 20:01:28 +0000 (21:01 +0100)
* testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
Fix return value.

From-SVN: r271189

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/util/testsuite_allocator.h

index 52cd3adfc8b091b89d71929358ce0ff62b741db1..ecdba1d07569de2bd138810d28e4167f56e10806 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-14  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
+       Fix return value.
+
 2019-05-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config/os/solaris/solaris2.10: Move to ...
index ac7dc8ee2c459c598810cf3ad4a86ce834ef84ba..d817ac4e838fd67a70b7e7713b80a9fce80a5cd2 100644 (file)
@@ -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