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

履歴 編集

function
<random>

std::random_device::max(C++11)

static constexpr result_type max();

概要

生成する値の最大値を取得する。

戻り値

numeric_limits<result_type>::max()

計算量

定数時間

#include <iostream>
#include <random>

int main()
{
  unsigned int max_value = std::random_device::max();
  std::cout << max_value << std::endl;
}

出力例

4294967295

バージョン

言語

  • C++11

処理系

参照