std::random_device::operator()

從 cppreference.com
< cpp‎ | numeric‎ | random‎ | random device
 
 
 
 
 
result_type operator()();
(C++11 起)

生成均勻分佈的非確定隨機值。

目錄

參數

(無)

返回值

均勻分布於 [min(), max()] 的隨機數。

異常

若不能生成隨機數則拋出派生於 std::exception 的實現定義異常。

參閱

[靜態]
獲取輸出範圍中的最小可能值
(公開靜態成員函數) [編輯]
[靜態]
獲取輸出範圍中的最大可能值
(公開靜態成員函數) [編輯]