[Boost-bugs] [Boost C++ Libraries] #2679: boost::uniform_01 constructor

Subject: [Boost-bugs] [Boost C++ Libraries] #2679: boost::uniform_01 constructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-01-26 09:07:43


#2679: boost::uniform_01 constructor
------------------------------+---------------------------------------------
 Reporter: rick68_at_[hidden] | Owner: no-maintainer
     Type: Patches | Status: new
Milestone: Boost 1.38.0 | Component: random
  Version: Boost 1.37.0 | Severity: Optimization
 Keywords: |
------------------------------+---------------------------------------------
 Hi,

 In <boost/random/uniform_01.hpp>

 line42: explicit uniform_01(base_type rng)
 line43: _rng(rng),
 line44: _factor(result_type(1) /
 line45: (result_type((_rng.max)()-(_rng.min)()) +
 line46:
 result_type(std::numeric_limits<base_result>::is_integer ? 1 : 0)))

 If prototype "uniform_01(base_type rng)" change to "uniform_01(const
 base_type& rng)", it can just once copy object rng.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2679>
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:49:59 UTC