首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::char_traits::lt

(1)

static bool eq( char_type a, char_type b );

(until C++11)

static constexpr bool eq( char_type a, char_type b );

(since C++11)

(2)

static bool lt( char_type a, char_type b );

(until C++11)

static constexpr bool lt( char_type a, char_type b );

(since C++11)

比较两个字符。

1%29比较ab为了平等。

2%29比较ab以一种完全有序的方式。

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

(since C++11)

参数

a, b

-

character values to compare

返回值

1%29true如果ab是平等的,false否则。

2%29true如果a再少点b,,,false否则。

例外

(none)

(until C++11)

noexcept specification: noexcept

(since C++11)

复杂性

常量。

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券