Boost logo

Boost :

Subject: Re: [boost] math/tools/rational.hpp gcc 3.2 problem
From: Christian Schladetsch (christian.schladetsch_at_[hidden])
Date: 2009-10-14 08:17:14


Sorry, missed the point about taking a const array by reference.

On Thu, Oct 15, 2009 at 1:15 AM, Christian Schladetsch <
christian.schladetsch_at_[hidden]> wrote:

>
>
> On Fri, Oct 9, 2009 at 5:55 AM, Ralf W. Grosse-Kunstleve <rwgk_at_[hidden]>wrote:
>
>> 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)
>>
>
> I will be wrong linguistically, but I hate the definition of 'a' here. What
> is it to be? I assume it is a reference to an array, I guess. But then why
> not just take a reference to the first element and a count, or use a range
> (pointer + size)?
>
> Sorry, I don't know anything about boost/math/distributions. But this kind
> of non-problem being a problem is in fact, a problem.
>
> If 'a' is just an array, say it like it is. Why make a fuss?
>
> Christian
>


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