Boost logo

Boost Users :

From: Glen Knowles (gknowles_at_[hidden])
Date: 2003-04-11 13:33:50


From: Jens Maurer
>> Uniform int contains an assert if min < max. If I ask for a random
between 1
>> and 1 I'm expecting a 1, not an assert. Is there some reason this was
deemed
>> inappropriate?
>
>When I wrote that code, I never thought somebody would want to generate
>a constant 1 as a random number. I agree that this looks non-orthogonal
>on first sight. I'll look into it.

In my specific case I have a number of objects determined at run time and am
randomly picking a number between one and the number of objects in order to
select one. The workaround is to simply test for one before the call, but
the assert was unexpected.

Thanks,
Glen

[Non-text portions of this message have been removed]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net