Namespaces
Variants

std:: not_equal_to<void>

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>
template <>
class not_equal_to < void > ;
(C++14부터)

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

목차

중첩 타입

중첩 타입 정의
is_transparent unspecified

멤버 함수

operator()
두 인수가 서로 같지 않은지 검사합니다
(public member function)

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

template < class T, class U >

constexpr auto operator ( ) ( T && lhs, U && rhs ) const

- > decltype ( std:: forward < T > ( lhs ) ! = std:: forward < U > ( rhs ) ) ;

lhs rhs 사이의 비동등 비교 결과를 반환합니다.

매개변수

lhs, rhs - 비교할 값들

반환 값

std:: forward < T > ( lhs ) ! = std:: forward < U > ( rhs ) .

예제

#include <functional>
int main()
{
    constexpr int p = 0, q = 8;
    std::not_equal_to<> not_equal{};
    static_assert(!not_equal(p, p));
    static_assert(not_equal(p, q));
}