Scroll to navigation

std::char_traits::eq,std::char_traits::lt(3) C++ Standard Libary std::char_traits::eq,std::char_traits::lt(3)

NAME

std::char_traits::eq,std::char_traits::lt - std::char_traits::eq,std::char_traits::lt

Synopsis


static bool eq( char_type a, char_type b ); (until C++11)
static constexpr bool eq( char_type a, char_type (since C++11)
b ) noexcept; (1)
static bool lt( char_type a, char_type b ); (until C++11)
static constexpr bool lt( char_type a, char_type (2) (since C++11)
b ) noexcept;


Compares two characters.


1) Compares a and b for equality.
2) Compares a and b in such a way that they are totally ordered.


For the char specialization, eq and lt are defined identically to the (since C++11)
built-in operators == and < for type unsigned char (not char).

Parameters


a, b - character values to compare

Return value


1) true if a and b are equal, false otherwise.
2) true if a is less than b, false otherwise.

Complexity


Constant.

2022.07.31 http://cppreference.com