Boost C++ 库

... 世界上最受尊敬、设计最精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu, C++ Coding Standards

函数模板 operator< - Boost C++ 函数库
PrevUpHomeNext

函数模板 operator<

boost::operator< — 逐个比较两个 circular_buffer,以确定左边的是否小于右边的。

提要

// In header: <boost/circular_buffer/base.hpp>


template<typename T, typename Alloc> 
  bool operator<(const circular_buffer< T, Alloc > & lhs, 
                 const circular_buffer< T, Alloc > & rhs);

描述

复杂度:线性(与 circular_buffer 的大小成正比)。

迭代器失效。 不使任何迭代器失效。

参数

lhs

要比较的 circular_buffer

rhs

要比较的 circular_buffer

返回

std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end())

抛出

无。

PrevUpHomeNext