如果在运算符的左边、向量、双端队列对象大于或等于右侧,的、向量、双端队列对象测试。
bool operator>=(
const deque<Type, Allocator>& _Left,
const deque<Type, Allocator>& _Right
);
参数
_Left
deque 类型的对象。_Right
deque 类型的对象。
返回值
true,如果在运算符的左边、向量、双端队列大于或等于、向量、双端队列在运算符的右侧;否则 false。
备注
在、向量、双端队列对象之间的比较根据其元素的比较pairwise。大于或等于两个对象之间的关系于比较的第一对不相等元素。
示例
// deque_op_ge.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>
int main( )
{
using namespace std;
deque <int> c1, c2;
c1.push_back( 1 );
c1.push_back( 3 );
c1.push_back( 1 );
c2.push_back( 1 );
c2.push_back( 2 );
c2.push_back( 2 );
if ( c1 >= c2 )
cout << "Deque c1 is greater than or equal to deque c2." << endl;
else
cout << "Deque c1 is less than deque c2." << endl;
}
要求
标头: <deque>
命名空间: std