diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-11-23 22:02:53 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-11-23 22:02:53 +0000 |
commit | 8eb5ce86529a3f67571b07d5a47419bb8c9cd230 (patch) | |
tree | bce273fd5eea9b1cc7658c18742abba7947688e9 /libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp | |
parent | bbdf9b7d2b9eddf451b8f5991b00bb47c93f172c (diff) | |
download | bcm5719-llvm-8eb5ce86529a3f67571b07d5a47419bb8c9cd230.tar.gz bcm5719-llvm-8eb5ce86529a3f67571b07d5a47419bb8c9cd230.zip |
[libcxx] [test] D27020: Fix MSVC warning C4245 "conversion from 'X' to 'Y', signed/unsigned mismatch", part 7/12.
When initializing unsigned integers to their maximum values, change "const T M(~0);" to "const T M(static_cast<T>(-1));".
~0 and -1 are equivalent, but I consider the -1 form to be significantly clearer (and more consistent with other tests).
llvm-svn: 287827
Diffstat (limited to 'libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp')
-rw-r--r-- | libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp index 8c09f4fd010..d96ccf9de7f 100644 --- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/assign.pass.cpp @@ -37,7 +37,7 @@ test() test1<T, 0, 0, 0>(); test1<T, 0, 1, 2>(); test1<T, 1, 1, 2>(); - const T M(~0); + const T M(static_cast<T>(-1)); test1<T, 0, 0, M>(); test1<T, 0, M-2, M>(); test1<T, 0, M-1, M>(); |