最終更新日時:
が更新

履歴 編集

function
<random>

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

static constexpr result_type max();

概要

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

戻り値

2^w - 1を返す。

計算量

定数時間

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

int main()
{
  std::uint32_t max_value = std::ranlux24_base::max();
  std::cout << max_value << std::endl;
}

出力

16777215

バージョン

言語

  • C++11

処理系

  • Clang: 9.0.1
  • GCC: 4.7.2
  • Visual C++: 2010 , 2012 , 2013 , 2015 , 2017