Skip to content

Commit 3cee8a7

Browse files
burblebeetkoeppe
authored andcommitted
LWG3809 Is std::subtract_with_carry_engine<uint16_t> supposed to work?
1 parent 16c66ad commit 3cee8a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/numerics.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,13 +2885,13 @@
28852885
static constexpr size_t long_lag = r;
28862886
static constexpr result_type min() { return 0; }
28872887
static constexpr result_type max() { return @$m - 1$@; }
2888-
static constexpr result_type default_seed = 19780503u;
2888+
static constexpr uint_least32_t default_seed = 19780503u;
28892889

28902890
// constructors and seeding functions
2891-
subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {}
2891+
subtract_with_carry_engine() : subtract_with_carry_engine(0u) {}
28922892
explicit subtract_with_carry_engine(result_type value);
28932893
template<class Sseq> explicit subtract_with_carry_engine(Sseq& q);
2894-
void seed(result_type value = default_seed);
2894+
void seed(result_type value = 0u);
28952895
template<class Sseq> void seed(Sseq& q);
28962896

28972897
// equality operators
@@ -2946,7 +2946,7 @@
29462946
first construct \tcode{e}, a \tcode{linear_congruential_engine} object,
29472947
as if by the following definition:
29482948
\begin{codeblock}
2949-
linear_congruential_engine<result_type,
2949+
linear_congruential_engine<uint_least32_t,
29502950
40014u,0u,2147483563u> e(value == 0u ? default_seed : value);
29512951
\end{codeblock}
29522952
Then, to set each $X_k$,

0 commit comments

Comments
 (0)