Boost logo

Boost :

From: boost (boost_at_[hidden])
Date: 2002-02-13 01:08:30


Dear Deane Yang,

On Tuesday 12 February 2002 18:08, deane_yang wrote:
> I took at look at your code; it's exactly what I want.

In return a took a look at your example and would suggest the following
changes:

> // Addition and subtraction
> const this_type& operator+=(floating_type term);
> const this_type& operator+=(const this_type& term);
> const this_type& operator-=(floating_type term);
> const this_type& operator-=(const this_type& term);
>

    // Addition and subtraction
    this_type& operator+=(const floating_type term);
    this_type& operator+=(const this_type& term);
    this_type& operator-=(const floating_type term);
    this_type& operator-=(const this_type& term);

similar changes for *=,/=. Or is there a reason for const return type ?

> private:
> FloatingType f[Order];

std::valarray<FloatingType> f;
to simplify the implementation of some operations.
Note, you should use f[Order+1] .

Best wishes
Peter


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