Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-09-08 02:46:43


jhr.walter_at_[hidden] (Joerg Walter) writes:

| > Well, happy or not one has to cope with one thing or the other.
| > A complaint I regularly see reported on the GCC list is GCC's
| > inconsistent use of mixed precision on x86 plateforms.
|
| But wouldn't help an implementation like
|
| template<class T1, class T2>
| typename promote_traits<T1, T2>::result_type operator+(const T1 &t1, const
| T2 &t2) {
| typedef typename promote_traits<T1, T2>::result_type result_type;
| return result_type (t1) + result_type (t2);
| }
|
| to prevent such complaints then?

No. Sure the computation is done in a wider precision, but there is no
control on the *actual* destination type.

-- Gaby


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