Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/ToStringVector.cpp
diff options
context:
space:
mode:
authorBilly Robert O'Neal III2016-10-14 14:06:45 -0700
committerBilly Robert O'Neal III2016-10-14 14:06:45 -0700
commitccf7f2842a356e8901f8e6fe988da2f5a93db329 (patch)
tree57d2ee2603c2a06f3c004997a48973cdcee66fc3 /projects/SelfTest/ToStringVector.cpp
parent88732e85b2ac0233bba6fec5c032d02f9c5c230b (diff)
downloadcatch3-ccf7f2842a356e8901f8e6fe988da2f5a93db329.tar.gz
Fix random_shuffle narrowing warnings
Catch passes an RNG which accepts int to random_shuffle. Inside random_shuffle, the STL tries to call that RNG with the difference_type of the user provided iterators. For std::vector, this is ptrdiff_t, which on amd64 builds is wider than int. This triggers a narrowing warning because the 64 bit difference is being truncated to 32 bits. Note that this RNG implementation still does not produce a correctly uniformly shuffled result -- it's currently asserting that std::rand can produce 1000000 which is false -- but I don't know enough about how much repeatable shuffles are necessary here, so I'm leaving that alone for now.
Diffstat (limited to 'projects/SelfTest/ToStringVector.cpp')
0 files changed, 0 insertions, 0 deletions