Boost logo

Boost :

From: Roman Yakovenko (roman.yakovenko_at_[hidden])
Date: 2006-08-08 02:37:36


boost_at_[hidden]

Hi. Instantiation of class lognormal_distribution<double> could not be compiled.

Error message:
D:\boost_cvs\boost\random\lognormal_distribution.hpp(63) : error
C2440: 'return' : cannot convert from 'const double' to 'double &'
Conversion loses qualifiers
D:\boost_cvs\boost\random\lognormal_distribution.hpp(63) : while
compiling class-template member function 'double
&boost::lognormal_distribution<>::mean(void) const'
dev\boost_random\random_export.hpp(323) : see reference to class
template instantiation 'boost::lognormal_distribution<>' being
compiled

I think that "mean" and "sigma" functions should have return type
RealType instead of RealType&.

  RealType& mean() const { return _mean; } ==> RealType mean() const
{ return _mean; }
  RealType& sigma() const { return _sigma; } ==> RealType sigma()
const { return _sigma; }

Thanks

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk