Boost logo

Boost :

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


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

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; }


Roman Yakovenko
C++ Python language binding

Boost list run by bdawes at, gregod at, cpdaniel at, john at