Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-10-25 16:23:22

----- Original Message -----
From: Ed Brey <edbrey_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, October 25, 2001 10:20 AM
Subject: Re: [boost] Math constants for naive and gurus? - which constants
do you want?

> Of course, there is still the option of simply providing a bunch of simple
double constants for non-generic uses, and then a separate simple function
interface for generic uses, like this
> template<typename T>
> struct constants {}
> template<>
> struct constants<double> {
> static double pi() {return 3.14;}
> }
There is a problem with this: it doesn't allow you to add new constants.
IMO, the design must contemplate the case of adding new constants with as
much the same interface as possible.

Fernando Cacciola
Sierra s.r.l.

Boost list run by bdawes at, gregod at, cpdaniel at, john at