diff --git a/include/boost/json/impl/monotonic_resource.ipp b/include/boost/json/impl/monotonic_resource.ipp index a42c7023..0dc4a4f3 100644 --- a/include/boost/json/impl/monotonic_resource.ipp +++ b/include/boost/json/impl/monotonic_resource.ipp @@ -127,7 +127,7 @@ monotonic_resource:: do_is_equal( memory_resource const& mr) const noexcept { - return false; + return this == &mr; } } // json diff --git a/test/storage_ptr.cpp b/test/storage_ptr.cpp index a5c16aaf..459953a0 100644 --- a/test/storage_ptr.cpp +++ b/test/storage_ptr.cpp @@ -45,9 +45,9 @@ public: bool do_is_equal( - memory_resource const&) const noexcept override + memory_resource const& mr) const noexcept override { - return false; + return this == &mr; } }; diff --git a/test/test.hpp b/test/test.hpp index 5befcc2a..e4dd6b53 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -81,7 +81,7 @@ struct fail_resource do_is_equal( memory_resource const& mr) const noexcept override { - return false; + return this == &mr; } }; @@ -134,7 +134,7 @@ struct unique_resource do_is_equal( memory_resource const& mr) const noexcept override { - return false; + return this == &mr; } };