Opened 14 years ago
Closed 14 years ago
#2679 closed Patches (fixed)
boost::uniform_01 constructor
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | Boost 1.38.0 | Component: | random |
Version: | Boost 1.37.0 | Severity: | Optimization |
Keywords: | Cc: | Jens.Maurer@… |
Description
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.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
Patch