最終更新日時(UTC):
が更新

履歴 編集

function template
<random>

std::operator==(C++11)

namespace std {
  template <class Engine, size_t K>
  bool operator==(
    const shuffle_order_engine<Engine, K>& x,
    const shuffle_order_engine<Engine, K>& y);
}

概要

等値比較を行う。

戻り値

xyの状態シーケンスの、全ての値を等値比較し、等しければtrue、そうでなければfalseを返す。

計算量

O(状態シーケンスのサイズ)

#include <iostream>
#include <random>

int main()
{
  std::knuth_b e1;
  std::knuth_b e2;

  if (e1 == e2) {
    std::cout << "equal" << std::endl;
  }
  else {
    std::cout << "not equal" << std::endl;
  }
}

出力

equal

バージョン

言語

  • C++11

処理系

参照