Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 953 Bytes

File metadata and controls

50 lines (37 loc) · 953 Bytes

operator>=

  • deque[meta header]
  • std[meta namespace]
  • function template[meta id-type]
namespace std {
  // operator<=>により、以下の演算子が使用可能になる (C++20)
  template <class T, class Allocator>
  bool operator>=(const deque<T, Allocator>& x,
                  const deque<T, Allocator>& y); // (1) C++03
}

概要

dequeにおいて、左辺が右辺以上かを判定する。

戻り値

!(x < y)

計算量

線形時間

#include <iostream>
#include <deque>

int main ()
{
  std::deque<int> c1 = {4, 5, 6};
  std::deque<int> c2 = {1, 2, 3};

  std::cout << std::boolalpha;

  std::cout << (c1 >= c2) << std::endl;
}

出力

true

参照