Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 928 Bytes

File metadata and controls

56 lines (40 loc) · 928 Bytes

max

  • random[meta header]
  • std[meta namespace]
  • random_device[meta class]
  • function[meta id-type]
  • cpp11[meta cpp]
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;
}
  • max()[color ff0000]

出力例

4294967295

バージョン

言語

  • C++11

処理系

参照