# std::random_device::operator()

> C++ Atlas: `cppatlas.com/w/cpp/numeric/random/random_device/operator()` | Source: https://en.cppreference.com/w/cpp/numeric/random/random_device/operator() | Domain: Numerics | Standards: C++11

Generates a non-deterministic uniformly-distributed random value.

## Official Specification Summary (cppreference)

```cpp
result_type operator()(); // (since C++11)
```

Generates a non-deterministic uniformly-distributed random value.

### Parameters

(none)

### Return value

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

### Exceptions

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

### See also

- [`min`](https://en.cppreference.com/w/cpp/numeric/random/random_device/min) [static]: gets the smallest possible value in the output range (public static member function)
- [`max`](https://en.cppreference.com/w/cpp/numeric/random/random_device/max) [static]: gets the largest possible value in the output range (public static member function)

---
Attribution: content from https://en.cppreference.com/w/cpp/numeric/random/random_device/operator() (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.