Namespaces
Variants

std:: owner_less

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
헤더에 정의됨 <memory>
template <>
struct owner_less < void > ;
(C++17부터)

std:: owner_less < void > 는 매개변수 타입이 추론된 std::owner_less 의 특수화입니다.

목차

중첩 타입

중첩 타입 정의
is_transparent unspecified

멤버 함수

operator()
인자를 소유자 기반 의미론을 사용하여 비교합니다
(함수)

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

template < class T, class U >

bool operator ( ) ( const std:: shared_ptr < T > & lhs,

const std:: shared_ptr < U > & rhs ) const noexcept ;
(C++17부터)
template < class T, class U >

bool operator ( ) ( const std:: shared_ptr < T > & lhs,

const std:: weak_ptr < U > & rhs ) const noexcept ;
(C++17부터)
template < class T, class U >

bool operator ( ) ( const std:: weak_ptr < T > & lhs,

const std:: shared_ptr < U > & rhs ) const noexcept ;
(C++17부터)
template < class T, class U >

bool operator ( ) ( const std:: weak_ptr < T > & lhs,

const std:: weak_ptr < U > & rhs ) const noexcept ;
(C++17부터)

lhs rhs 를 소유자 기반 의미론으로 비교합니다. 효과적으로 lhs. owner_before ( rhs ) 를 호출합니다.

순서는 엄격한 약순서 관계입니다.

lhs rhs 는 둘 다 비어있거나 소유권을 공유할 때만 동등합니다.

매개변수

lhs, rhs - 비교할 공유 소유권 포인터

반환값

true - 소유자 기반 순서에 따라 lhs rhs 보다 작은 경우

참고 사항

기능 테스트 매크로 표준 기능
__cpp_lib_transparent_operators 201510L (C++17) 투명 std::owner_less ( std:: owner_less < void > )

참고 항목

shared pointer의 소유자 기반 순서 제공
( std::shared_ptr<T> 의 public 멤버 함수)
weak pointer의 소유자 기반 순서 제공
( std::weak_ptr<T> 의 public 멤버 함수)