Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-04-12 03:12:37


Aleksey Gurtovoy wrote:
> Paul Mensonides wrote:
>> #define BOOST_PP_IS_SEQ BOOST_PP_IS_UNARY
>>
>> BOOST_PP_IS_SEQ( (a)(b)(c) ) // 1
>> BOOST_PP_IS_SEQ( xyz ) // 0
>> BOOST_PP_IS_SEQ( ++ ) // 0
>>
>> The second one with fail on Borland (and maybe IBM and Sun also),
>> but otherwise it should work fine.
>
> Oh, great, can we have it under that name, then?

It is not an interface macro. You can use it (e.g. BOOST_PP_IS_UNARY), and it
will remain, but I do not want to make interfaces public that don't work
properly on all major vendors. (I assume that you are trying to deal with an
"end-of-seq" indicator. FYI, nil sequences are directly supported in the
"strict" pp-lib if using C99 facilities.)

The same is true for the identifier comparison. You can use that
implementation, but I don't want fragment the interface of the CVS pp-lib. If
people want more heavy-duty facilities, they can use the "strict" version, which
doesn't play around like the CVS version.

I realize that that is a difficult price to pay--especially for a library
author. I'm willing to work with you to make this kind of stuff for your own
use internally as long as you understand the problems associated with using this
kind of stuff on buggy preprocessors.

>> BTW, how long is your list of things that you want? ;)
>
> That's it so far :), although I cannot promise something else won't
> come up as I am using the library quite intensively at the moment.

It's okay. I just have a lot to do at the moment. In case your interested, the
"strict" pp-lib defines those detection macros as interface macros. It also
defines the identifier comparison mentioned before (including built-in
comparisons for all C and C++ keywords, alternative tokens, directive names, and
alphabetic operators), and a "default" argument facility. It also supports a
macro overloading facility, etc., etc..

Paul Mensonides


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