[random] lognormal_distribution fix

hi all, i just figured out, that the problem, that was discussed in this thread: http://lists.boost.org/Archives/boost/2003/02/44916.php somehow hasn't been fixed ... i've attached a small regression test, showing the problem ... the fix is rather trivial, though: --- boost/random/lognormal_distribution.hpp (revision 681) +++ boost/random/lognormal_distribution.hpp (working copy) @@ -60,8 +60,8 @@ // compiler-generated copy ctor and assignment operator are fine - RealType& mean() const { return _mean; } - RealType& sigma() const { return _sigma; } + RealType mean() const { return _mean; } + RealType sigma() const { return _sigma; } void reset() { _normal.reset(); } template<class Engine> would be great to see this fixed ... cheers, tim -- tim@klingt.org ICQ: 96771783 http://tim.klingt.org The aim of education is the knowledge, not of facts, but of values William S. Burroughs

Tim Blechmann wrote:
i just figured out, that the problem, that was discussed in this thread: http://lists.boost.org/Archives/boost/2003/02/44916.php somehow hasn't been fixed ...
Hm... I think it has been fixed: cvs log lognormal_distribution.hpp ... revision 1.13 date: 2003/02/25 10:29:29; author: bjorn_karlsson; state: Exp; lines: +3 -3 Changed RealType& to RealType for mean and sigma ... Jens

On Thu, 2007-05-17 at 10:32 +0200, Jens Maurer wrote:
Tim Blechmann wrote:
i just figured out, that the problem, that was discussed in this thread: http://lists.boost.org/Archives/boost/2003/02/44916.php somehow hasn't been fixed ...
Hm... I think it has been fixed:
cvs log lognormal_distribution.hpp ... revision 1.13 date: 2003/02/25 10:29:29; author: bjorn_karlsson; state: Exp; lines: +3 -3 Changed RealType& to RealType for mean and sigma ...
then why did my example program fail to compile ;) ... going through the diffs, i found that the fix has been reverted in revision 1.14 ... tim -- tim@klingt.org ICQ: 96771783 http://tim.klingt.org Cheat your landlord if you can and must, but do not try to shortchange the Muse. It cannot be done. You can't fake quality any more than you can fake a good meal. William S. Burroughs
participants (2)
-
Jens Maurer
-
Tim Blechmann