Re: [Boost-bugs] [Boost C++ Libraries] #6059: uniform_real_distribution fails when _min = _max

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6059: uniform_real_distribution fails when _min = _max
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-01 16:55:29


#6059: uniform_real_distribution fails when _min = _max
----------------------------------------+-----------------------------------
  Reporter: dario.izzo@… | Owner: steven_watanabe
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: random
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------+-----------------------------------

Comment (by Edward Rudd <urkle@…>):

 @steve_watanabe if min == max is illegal then shouldn't the ASSERT in the
 constructor be _min < _max instead of "<=" as it is now? This is rather
 diceiving as I expected it to throw some error in the condition of _min ==
 _max (which in my case only occurred to due a bug in my code that
 calculated the range). Had the assert in uniform_real_distribution been
 correct I would have been able to find the error quicker.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6059#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC