Re: Fix random_sample_n and random_shuffle when RAND_MAX is small

2019-01-20 Thread Giovanni Bajo
Il giorno mar 15 gen 2019 alle ore 03:38 Jonathan Wakely ha scritto: > On 12/12/18 22:31 +0100, Giovanni Bajo wrote: > >Hello, > > > >we hit a bug today while cross-compiling a C++ program with mingw32: > >if random_shuffle or random_sample_n are called with a se

Fix random_sample_n and random_shuffle when RAND_MAX is small

2018-12-12 Thread Giovanni Bajo
red by the standard, but it sounds like a good thing to do for backward compatibility with existing programs). I was wondering if this approach is OK or something else is preferred. -- Giovanni Bajo :: ra...@develer.com Develer S.r.l. :: http://www.develer.com rand.diff Description: Binary data