
8 Oct
2009
8 Oct
'09
4:55 p.m.
gcc 3.2 doesn't compile this code (works with gcc 3.3 and up): #include <boost/math/distributions.hpp> int main() { boost::math::students_t_distribution<double> dist(1.); dist.find_degrees_of_freedom(1.,2.,3.,4.,5.); return 0; } Reduced: template <unsigned N, class T, class V> inline V evaluate_polynomial(const T(&a)[N], const V& val) { return val * a[0] * static_cast<T>(N); } int main() { double a[3]; double val; double result = evaluate_polynomial(a, val); return static_cast<int>(result); } dbg2.cpp: In function `int main()': dbg2.cpp:12: no matching function for call to ` evaluate_polynomial(double[3], double&)' Does anyone have an idea for working around the problem? Ralf