Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-04-19 13:03:01

I agree with Jens.
Ed Brey's suggestion looks very good to me:

> namespace boost {
> namespace math {
> template<typename T>
> struct constants {
> static T pi() {return T(3.1415...L);}
> };
> }
> }
> where a typical user experience would be documented as this:
> typedef boost::math::constants<float> c;
> std::cout << "Baseball and apple " << c::pi();

The problem with the undef approach is that it does not work if
BOOST_UNITY is defined before your header file is included.
I would encourage you to go back to your original approach
of writing the C++ header file directly. If your
names follow *some* kind of consistent scheme, I am your
first user.


--- In boost_at_y..., Jens Maurer <Jens.Maurer_at_g...> wrote:
> "Paul A. Bristow" wrote:
> > Indeed that's what I did originally - but without agreement about
the names!
> It's easy to quibble about names, and everyone likes to do that.
> In the case of names, someone (the library submitter) has to make a
> decision, document which were the rejected alternative naming
> schemes and move on. People will either adjust to your names or
> detest them enough to ignore your library, which is less easy
> if it's of good quality and thus hurts them a lot.
> (Btw, I didn't have the impression that names were that much a
> constroversy. Sure, people had different suggestions, but I don't
> remember any "over my dead body" votes on a particular naming
> scheme.)
> In general, having a comprehensible, documented naming scheme
> (whatever it is) seems important to me. Then, the user can
> remember the scheme, guess "two_pi" (or "pi_times_2"?) without
> looking at the documentation and actually has a good chance of
> finding what he desires.
> Jens Maurer

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