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

FreeBSD Manual Pages

  
 
  

home | help
std::owner_less(3)	      C++ Standard Libary	    std::owner_less(3)

NAME
       std::owner_less - std::owner_less

Synopsis
	  Defined in header <memory>
	  template<>		      (since C++17)
	  struct owner_less<void>;

	  std::owner_less<void>	 is  a	specialization of std::owner_less with
       parameter types
	  deduced.

Member functions
	  operator() compares its arguments using owner-based semantics
		     (function)

       std::owner_less<void>::operator()

	  template< class T, class U >

	  bool	    operator()(	     const	std::shared_ptr<T>&	  lhs,
       (since C++17)

			   const std::shared_ptr<U>& rhs ) const noexcept;
	  template< class T, class U >

	  bool	     operator()(      const	 std::shared_ptr<T>&	  lhs,
       (since C++17)

			   const std::weak_ptr<U>& rhs ) const noexcept;
	  template< class T, class U >

	  bool	    operator()(	      const	  std::weak_ptr<T>&	  lhs,
       (since C++17)

			   const std::shared_ptr<U>& rhs ) const noexcept;
	  template< class T, class U >

	  bool	     operator()(       const	   std::weak_ptr<T>&	  lhs,
       (since C++17)

			   const std::weak_ptr<U>& rhs ) const noexcept;

	  Compares lhs and rhs using owner-based semantics. Effectively	calls
	  lhs.owner_before(rhs).

	  The ordering is strict weak ordering relation.

	  lhs and rhs are equivalent only if they are both empty or share own-
       ership.

Parameters
	  lhs, rhs - shared-ownership pointers to compare

Return value
	  true if lhs is less than rhs as determined by	the owner-based	order-
       ing.

Notes
		Feature-test macro	   Value     Std		  Fea-
       ture
	  __cpp_lib_transparent_operators    201510L	(C++17)	   Transparent
       std::owner_less
							  (std::owner_less<void>)

See also
	  owner_before provides	owner-based ordering of	shared pointers
		       (public member function of std::shared_ptr<T>)
	  owner_before provides	owner-based ordering of	weak pointers
		       (public member function of std::weak_ptr<T>)

http://cppreference.com		  2024.06.10		    std::owner_less(3)

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

home | help