
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Ralf W. Grosse-Kunstleve Sent: Thursday, October 08, 2009 5:55 PM To: boost@lists.boost.org Subject: [boost] math/tools/rational.hpp gcc 3.2 problem
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?
It looks as though compliance testing was done with Linux GNU C++ 3.4 (performance was done with Cygwin G++ 3.4 - and John Maddock notes that 4. optimises much better). So sorry but I don't have any suggestions - apart from using gcc 3.3 or up ;-) Paul --- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow@hetp.u-net.com