RandomNumberGenerator::result_type should be unsigned (#1050)

`result_type` must be unsigned:
http://en.cppreference.com/w/cpp/concept/UniformRandomBitGenerator

Using a signed type causes an infinite loop working with MS Visual Studio 2017, targetting: v140, WindowsTargetPlatformVersion 10.0.15063.0, Debug, x64
This commit is contained in:
Sebastian Grottel 2017-10-15 18:30:40 +02:00 committed by Martin Hořeňovský
parent e68485e196
commit 96c5de678d

View File

@ -20,7 +20,7 @@ namespace Catch {
unsigned int rngSeed(); unsigned int rngSeed();
struct RandomNumberGenerator { struct RandomNumberGenerator {
using result_type = std::ptrdiff_t; using result_type = unsigned int;
static constexpr result_type (min)() { return 0; } static constexpr result_type (min)() { return 0; }
static constexpr result_type (max)() { return 1000000; } static constexpr result_type (max)() { return 1000000; }