Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.21 KB

File metadata and controls

54 lines (41 loc) · 1.21 KB

base

  • random[meta header]
  • std[meta namespace]
  • discard_block_engine[meta class]
  • function[meta id-type]
  • cpp11[meta cpp]
const Engine& base() const noexcept;

概要

元となる乱数生成器を取得する。

戻り値

メンバ変数として保持している、元となる乱数生成器へのconst参照を返す。

#include <iostream>
#include <random>

int main()
{
  std::ranlux24 engine;

  // 元となる乱数生成器を取得
  const std::ranlux24_base& base_engine = engine.base();
}
  • base()[color ff0000]
  • std::ranlux24[link /reference/random/ranlux24.md]
  • std::ranlux24_base[link /reference/random/ranlux24_base.md]

出力

バージョン

言語

  • C++11

処理系

参照

  • LWG Issue 1438. No definition for base()
    • C++11で、乱数エンジンアダプタの要件にbase()の規定が追加された。各アダプタの宣言にはあったが、意味が規定されていなかった