operator< (<forward_list>)

比正向列表右侧的测试,如果向前运算符左侧的列表对象小于对象。

bool operator<(
    const forward_list <Type, Allocator>& _Left,
    const forward_list <Type, Allocator>& _Right
);

参数

Parameter

说明

_Left

forward_list 类型的对象。

_Right

forward_list 类型的对象。

返回值

true,如果在运算符左侧的列表不小于,但等于列表在运算符的右侧;否则 false。

备注

此模板函数重载 operator< 比较模板选件类 forward_list两个对象。函数返回 lexicographical_compare(lhs. begin(), lhs. end(), rhs.begin(), rhs.end())。

要求

标头: <forward_list>

命名空间: std

请参见

参考

<forward_list>