Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::shared...::owner_hash(3) C++ Standard Libarystd::shared...::owner_hash(3)

NAME
       std::shared_ptr::owner_hash - std::shared_ptr::owner_hash

Synopsis
	  std::size_t owner_hash() const noexcept;  (since C++26)

	  Returns  an  unspecified  value such that for	any object other where
       owner_equal(other)
	  is true, owner_hash()	== other.owner_hash() is true.

	  This hashing is used to make shared and weak pointers	usable as keys
       in unordered
	  associative containers, typically through std::owner_hash.

Return value
	  A value that is identical for	any std::shared_ptr  or	 std::weak_ptr
       object sharing
	  the same ownership.

Notes
		  Feature-test macro	      Value    Std		  Fea-
       ture
							     Enabling  the use
       of
	  __cpp_lib_smart_ptr_owner_equality 202306L  (C++26)  std::shared_ptr
       as keys in
							     unordered	 asso-
       ciative containers

Example
	   This	section	is incomplete
	   Reason: example

See also
	  owner_hash provides owner-based hashing for shared and weak pointers
	  (C++26)    (class)

Category:
	    * Todo with	reason

http://cppreference.com		  2024.06.10	 std::shared...::owner_hash(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::shared_ptr::owner_hash&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help