Skip to content

Commit 562a3be

Browse files
committed
LWG4014 LWG 3809 changes behavior of some existing std::subtract_with_carry_engine code
1 parent 8dc94df commit 562a3be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/numerics.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3034,7 +3034,8 @@
30343034
as if by the following definition:
30353035
\begin{codeblock}
30363036
linear_congruential_engine<uint_least32_t,
3037-
40014u,0u,2147483563u> e(value == 0u ? default_seed : value);
3037+
40014u,0u,2147483563u> e(value == 0u ? default_seed :
3038+
static_cast<uint_least32_t>(value % 2147483563u));
30383039
\end{codeblock}
30393040
Then, to set each $X_k$,
30403041
obtain new values $z_0, \dotsc, z_{n-1}$

0 commit comments

Comments
 (0)