From Jason Turner

[rand.device]

Diff to HTML by rtfpessoa

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
- explicit random_device(const string& token = implementation-defined);
 
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 = implementation-defined);
36
  ```
37
 
38
- *Effects:* Constructs a `random_device` nondeterministic uniform random
39
- bit generator object. The semantics and default value of the `token`
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()`, 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
 
 
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