Namespaces
Variants
Actions

std::random_device::operator()

From cppreference.com
< cpp‎ | numeric‎ | random‎ | random device
 
C++
 
Numerics library
 
Pseudo-random number generation
 
std::random_device
Member functions
Generation
random_device::operator()
Characteristics
 
result_type operator()();
(since C++11)

Generates a non-deterministic uniformly-distributed random value.

Contents

[edit] Parameters

(none)

[edit] Return value

A random number uniformly distributed in [min(), max()].

[edit] Exceptions

Throws an implementation-defined exception derived from std::exception if a random number could not be generated.

[edit] See also

[static]
gets the smallest possible value in the output range
(public static member function) [edit]
[static]
gets the largest possible value in the output range
(public static member function) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant