Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-08 11:37:23

----- Original Message -----
From: "Vesa Karvonen" <vesa_karvonen_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, April 08, 2002 10:56 AM
Subject: Re: [boost] Preprocessor: requirements on macro args

> David Abrahams:
> >The docs for BOOST_PP_BOOL(X) say:
> >
> > Expands to 0 if X == 0 and 1 if X != 0.
> >
> >So I expected:
> >
> > BOOST_PP_BOOL(const volatile) == 1
> >
> >However, that's not the case. I think this problem is endemic in the
> >docs. How do I know which macros expect numeric arguments?
> Yes, I should probably describe the parameter requirements more


> The reason why it is not explicitly stated, is because all logical,
> comparison and arithmetic operations expect decimal integer literals.
> is intuitive, because decomposing arbitrary token[ sequence]s using
> preprocessor is impossible.

The author of a library should be disqualified from making judgements
about what's intuitive for his users ;-)

I think it would be better if the library's documentation assumed less
depth-of-understanding of the Preprocessor on the part of the user.


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