From 1c61e54b1371e085775d0aeeb467dc0da080caa3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 5 Jun 2020 18:12:59 +0300 Subject: [PATCH] Update documentation --- doc/smart_ptr/changelog.adoc | 6 +++++- doc/smart_ptr/shared_ptr.adoc | 13 +++++++++++++ doc/smart_ptr/weak_ptr.adoc | 13 +++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/doc/smart_ptr/changelog.adoc b/doc/smart_ptr/changelog.adoc index 21286ca..9de54f2 100644 --- a/doc/smart_ptr/changelog.adoc +++ b/doc/smart_ptr/changelog.adoc @@ -1,5 +1,5 @@ //// -Copyright 2019 Peter Dimov +Copyright 2019, 2020 Peter Dimov Distributed under the Boost Software License, Version 1.0. @@ -17,6 +17,10 @@ http://www.boost.org/LICENSE_1_0.txt * Added `owner_equals` to `shared_ptr`, `weak_ptr`, `local_shared_ptr` * Added `owner_equal_to` +* Added `std::hash` specializations for `shared_ptr`, `local_shared_ptr` +* Added `owner_hash_value` to `shared_ptr`, `weak_ptr` +* Added `boost::hash` support and `std::hash`, `std::equal_to` + specializations for `weak_ptr` ## Changes in 1.72.0 diff --git a/doc/smart_ptr/shared_ptr.adoc b/doc/smart_ptr/shared_ptr.adoc index 5d5303e..e39ff0c 100644 --- a/doc/smart_ptr/shared_ptr.adoc +++ b/doc/smart_ptr/shared_ptr.adoc @@ -183,6 +183,8 @@ namespace boost { template bool owner_equals(shared_ptr const & r) const noexcept; template bool owner_equals(weak_ptr const & r) const noexcept; + + std::size_t owner_hash_value() const noexcept; }; template @@ -677,6 +679,17 @@ template bool owner_equals(weak_ptr const & r) const noexcept; Returns:: `true` if and only if `*this` and `r` share ownership or are both empty. +### owner_hash_value +``` +std::size_t owner_hash_value() const noexcept; +``` +[none] +* {blank} ++ +Returns:: + An unspecified hash value such that two instances that share ownership + have the same hash value. + ## Free Functions ### comparison diff --git a/doc/smart_ptr/weak_ptr.adoc b/doc/smart_ptr/weak_ptr.adoc index 33455eb..476affb 100644 --- a/doc/smart_ptr/weak_ptr.adoc +++ b/doc/smart_ptr/weak_ptr.adoc @@ -115,6 +115,8 @@ namespace boost { template bool owner_equals( weak_ptr const & r ) const noexcept; template bool owner_equals( shared_ptr const & r ) const noexcept; + + std::size_t owner_hash_value() const noexcept; }; template @@ -298,6 +300,17 @@ template bool owner_equals( shared_ptr const & r ) const noexcept; Returns:: `true` if and only if `*this` and `r` share ownership or are both empty. +### owner_hash_value +``` +std::size_t owner_hash_value() const noexcept; +``` +[none] +* {blank} ++ +Returns:: + An unspecified hash value such that two instances that share ownership + have the same hash value. + ## Free Functions ### comparison