`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 664cbf702c
commit 296955c437
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@
namespace Catch {
struct RandomNumberGenerator {
typedef std::ptrdiff_t result_type;
typedef unsigned int result_type;
result_type operator()( result_type n ) const { return std::rand() % n; }