Boost logo

Boost :

From: Paul A Bristow (boost_at_[hidden])
Date: 2004-03-01 13:09:20


| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel Frey
| Sent: 01 March 2004 10:18
| To: boost_at_[hidden]
| Subject: [boost] Re: [math constants] a new approach (perhaps)

 The problems of your solution are:
|
| - Doesn't work well for UDTs (try std::complex, some conversions are
| ambiguous then)
| - Doesn't scale for new types (you need to know all of them in the
| single header that defines the constant)
| - Doesn't work for more complex expressions (pi*pi*t instead
| of T(pi)*pi*t)
| - Doesn't work for function calls (srqt(pi)*t instead of
| sqrt(T(pi))*t)
| - Doesn't solve the naming dilemma (how to spell the constant
| "pi*pi"?)
| - Doesn't work well with unit libraries AFAICS (again not
| scaling well)
|
| I really suggest you look at my code at
| <http://groups.yahoo.com/group/boost/files/MathConstants/>,
| which solves
| all of the above points.

Except that VC 7.1 doesn't think it is legal C++ :-((

I think we need to establish if it is correct (as gcc and Intel think it
is)
and then try to persuade Microsoft to change (perhaps by accepting
Daniel's math constants solution as Boost library).

Or to find some workaround that VC 7.1 will accept.

It would be helpful to know what do other highly conformant compilers,
like CodeWarrior and Comeau, say about Daniel Frey's proposal?

Paul

Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539 561830 +44 7714 330204
mailto: pbristow_at_[hidden]


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