Namespaces
Variants

std::ranges:: not_equal_to

From cppreference.net
Utilities library
Function objects
Function invocation
(C++17) (C++23)
Identity function object
(C++20)
Old binders and adaptors
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
( until C++17* ) ( until C++17* )
( until C++17* ) ( until C++17* )

( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
헤더 파일에 정의됨 <functional>
struct not_equal_to ;
(C++20부터)

비교를 수행하기 위한 함수 객체입니다. 함수 호출 연산자의 매개변수 유형을 인수로부터 추론합니다(반환 유형은 제외).

목차

중첩 타입

중첩 타입 정의
is_transparent unspecified

멤버 함수

operator()
인수가 서로 다른지 확인합니다
(public member function)

std::ranges::not_equal_to:: operator()

template < class T, class U >
constexpr bool operator ( ) ( T && t, U && u ) const ;

다음 코드와 동일합니다: return ! ranges:: equal_to { } ( std:: forward < T > ( t ) , std:: forward < U > ( u ) ) ; .

이 오버로드는 다음 조건이 만족될 때만 오버로드 해결에 참여합니다: std:: equality_comparable_with < T, U > .

참고 사항

std::not_equal_to 와 달리, std::ranges::not_equal_to == != 모두 유효해야 하며( equality_comparable_with 제약 조건을 통해), 그리고 완전히 std::ranges::equal_to 를 기반으로 정의됩니다.

예제

결함 보고서

다음의 동작 변경 결함 보고서들은 이전에 발표된 C++ 표준에 소급 적용되었습니다.

DR 적용 대상 게시된 동작 올바른 동작
LWG 3530 C++20 포인터 비교 시 구문적 검사가 완화됨 의미론적 요구사항만 완화됨

참고 항목

x ! = y 를 구현하는 함수 객체
(클래스 템플릿)