Boost logo

Boost :

Subject: Re: [boost] [config] std::shuffle support
From: Peter Dimov (lists_at_[hidden])
Date: 2016-11-07 07:58:23

Andrey Semashev wrote:
> > The standard random_shuffle doesn't use rng() % n though, it uses
> > rng(n). rng() % n is non-uniform in general.
> True, a more generic implementation would use uniform_int_distribution.
> It's fine for my particular use though, and maybe it would be fine for
> someone else's case, too.

For taking care of the existing uses of std::random_shuffle, it would
probably be easier to provide a drop-in replacement that works the same way.

Boost list run by bdawes at, gregod at, cpdaniel at, john at