tmp/tmp3x56d2j1/{from.md → to.md}
RENAMED
|
@@ -15,11 +15,12 @@ public:
|
|
| 15 |
// generator characteristics
|
| 16 |
static constexpr result_type min() { return numeric_limits<result_type>::min(); }
|
| 17 |
static constexpr result_type max() { return numeric_limits<result_type>::max(); }
|
| 18 |
|
| 19 |
// constructors
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
// generating functions
|
| 23 |
result_type operator()();
|
| 24 |
|
| 25 |
// property functions
|
|
@@ -30,16 +31,15 @@ public:
|
|
| 30 |
void operator=(const random_device&) = delete;
|
| 31 |
};
|
| 32 |
```
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
-
explicit random_device(const string& token
|
| 36 |
```
|
| 37 |
|
| 38 |
-
*
|
| 39 |
-
|
| 40 |
-
parameter are *implementation-defined*. [^3]
|
| 41 |
|
| 42 |
*Throws:* A value of an *implementation-defined* type derived from
|
| 43 |
`exception` if the `random_device` could not be initialized.
|
| 44 |
|
| 45 |
``` cpp
|
|
@@ -53,11 +53,11 @@ returned by `operator()`, in the range `min()` to log₂( `max()`+1).
|
|
| 53 |
``` cpp
|
| 54 |
result_type operator()();
|
| 55 |
```
|
| 56 |
|
| 57 |
*Returns:* A nondeterministic random value, uniformly distributed
|
| 58 |
-
between `min()` and `max()`
|
| 59 |
how these values are generated.
|
| 60 |
|
| 61 |
*Throws:* A value of an *implementation-defined* type derived from
|
| 62 |
`exception` if a random number could not be obtained.
|
| 63 |
|
|
|
|
| 15 |
// generator characteristics
|
| 16 |
static constexpr result_type min() { return numeric_limits<result_type>::min(); }
|
| 17 |
static constexpr result_type max() { return numeric_limits<result_type>::max(); }
|
| 18 |
|
| 19 |
// constructors
|
| 20 |
+
random_device() : random_device(implementation-defined) {}
|
| 21 |
+
explicit random_device(const string& token);
|
| 22 |
|
| 23 |
// generating functions
|
| 24 |
result_type operator()();
|
| 25 |
|
| 26 |
// property functions
|
|
|
|
| 31 |
void operator=(const random_device&) = delete;
|
| 32 |
};
|
| 33 |
```
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
+
explicit random_device(const string& token);
|
| 37 |
```
|
| 38 |
|
| 39 |
+
*Remarks:* The semantics of the `token` parameter and the token value
|
| 40 |
+
used by the default constructor are *implementation-defined*. [^3]
|
|
|
|
| 41 |
|
| 42 |
*Throws:* A value of an *implementation-defined* type derived from
|
| 43 |
`exception` if the `random_device` could not be initialized.
|
| 44 |
|
| 45 |
``` cpp
|
|
|
|
| 53 |
``` cpp
|
| 54 |
result_type operator()();
|
| 55 |
```
|
| 56 |
|
| 57 |
*Returns:* A nondeterministic random value, uniformly distributed
|
| 58 |
+
between `min()` and `max()` (inclusive). It is *implementation-defined*
|
| 59 |
how these values are generated.
|
| 60 |
|
| 61 |
*Throws:* A value of an *implementation-defined* type derived from
|
| 62 |
`exception` if a random number could not be obtained.
|
| 63 |
|