http://d.puremagic.com/issues/show_bug.cgi?id=7067



--- Comment #3 from bearophile_h...@eml.cc 2011-12-05 23:53:48 PST ---
(In reply to comment #2)

> The problem with taking a random generator by reference is that it then needs
> to be escaped. So people would be quite surprised to see that:
> 
> auto gen = rndGen;
> return randomSample(a, 5, gen);
> 
> has undefined behavior.
> 
> One way or another we need to solve this, e.g. by creating a wrapper with
> reference semantics over generators. Ideas are welcome.

Turn random generators into final classes?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to