public static member function
<string>

std::char_traits::lt

static bool lt (const char_type& c, const char_type& d);
static constexpr bool lt (char_type c, char_type d) noexcept;
Compare characters for inequality
Returns whether character c is considered less than character d (i.e., whether c goes before d when ordered).

char_traits 的标准特化中,此函数的行为与内置的行为相同operator<.
char_traits 的标准特化中,此函数的行为与内置的行为相同operator<for typeunsigned char.

参数

c, d
Character values.
成员类型char_type字符类型(即,char_traits 中的类模板参数)。

返回值

trueif c is considered less than d.

复杂度

常量。

异常安全

No-throw guarantee: this member function never throws exceptions in any of the standard specializations.

另见