Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 1.16 KB

File metadata and controls

66 lines (50 loc) · 1.16 KB

operator==

  • random[meta header]
  • std[meta namespace]
  • function template[meta id-type]
  • cpp11[meta cpp]
namespace std {
  template <class Engine, size_t W, class UIntType>
  bool operator==(
    const independent_bits_engine<Engine, W, UIntType>& x,
    const independent_bits_engine<Engine, W, UIntType>& y);
}

概要

等値比較を行う。

戻り値

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

計算量

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

#include <iostream>
#include <random>
#include <cstdint>

int main()
{
  using engine_type = std::independent_bits_engine<std::mt19937, 64, std::uint64_t>;

  engine_type e1;
  engine_type e2;

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

出力

equal

バージョン

言語

  • C++11

処理系

参照