Commit fedbd6c
committed
Fix error C2397: conversion from 'const int' to 'unsigned __int64' requires a narrowing conversion
Except for iterators with exotic difference types:
For x64 algorithms, `_Diff` is naturally 64-bit, so `is_same_v<_Udiff, uint64_t>` is naturally taken.
But for x86 algorithms, `_Diff` is naturally 32-bit. If the URBG is 32-bit (or smaller),
then `_Udiff` will be `uint32_t`, and the `else` branch will be taken.
In that case, the error correctly complains that we're using braces
to convert from signed `_Diff _Index` to unsigned `_Uprod`, which is narrowing.
We should directly `static_cast` instead.1 parent bb03a9e commit fedbd6c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6133 | 6133 | | |
6134 | 6134 | | |
6135 | 6135 | | |
6136 | | - | |
| 6136 | + | |
6137 | 6137 | | |
6138 | 6138 | | |
6139 | 6139 | | |
| |||
0 commit comments