Skip to content

Commit 8d387a5

Browse files
burblebeetkoeppe
authored andcommitted
LWG4014 LWG 3809 changes behavior of some existing std::subtract_with_carry_engine code
1 parent b461f80 commit 8d387a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/numerics.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,8 +3033,8 @@
30333033
first construct \tcode{e}, a \tcode{linear_congruential_engine} object,
30343034
as if by the following definition:
30353035
\begin{codeblock}
3036-
linear_congruential_engine<uint_least32_t,
3037-
40014u,0u,2147483563u> e(value == 0u ? default_seed : value);
3036+
linear_congruential_engine<uint_least32_t, 40014u, 0u, 2147483563u> e(
3037+
value == 0u ? default_seed : static_cast<uint_least32_t>(value % 2147483563u));
30383038
\end{codeblock}
30393039
Then, to set each $X_k$,
30403040
obtain new values $z_0, \dotsc, z_{n-1}$

0 commit comments

Comments
 (0)