Boost logo

Boost :

From: Petr Kocmid (pkocmid_at_[hidden])
Date: 2001-05-03 16:38:35

> -----Original Message-----
> From: k.hagan_at_[hidden] [mailto:k.hagan_at_[hidden]]
> Sent: Tuesday, May 01, 2001 11:11 AM
> To: boost_at_[hidden]
> Subject: [boost] Re: Math Constants
> > I'm losing track of what has and hasn't been suggested. Have we
> > considered specialising a class template with a static member?
> >
> > template<class T> class math
> > {
> > static T const pi;
> > };

Since I use happily this technique, I already suggested a static member
constant wrapped in empty class with specialisation by template argument in
early stage of the discussion, but had been beaten by some purist stating
that function interface is better for inlining. On some platfroms with
certain compilers, it's really true. Please look into archives for
discussion details. I still feel that function interface obfuscates user
code unnecesarily, and my solution is to generate headers in this style at
the moment the constant data will appear in the boost cvs.

Petr Kocmid

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