Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-06-28 12:16:18


This is exciting.

Vesa, I think it would be a great proof-of-concept to convert a few of the
generated files from Boost.Python to use PREPROCESSOR. If you would be
interested in walking me through one or two, that would be a big help. If
the results are fairly easy-to-read and implement, I would enthusiastically
support acceptance of this library.

Regards,
Dave

----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Cc: <boost-announce_at_[hidden]>
Sent: Thursday, June 28, 2001 1:02 PM
Subject: [boost] PREPROCESSOR library review

>
> The review for the PREPROCESSOR library starts today, June 28 and will
> continue until July 9.
>
> The PREPROCESSOR library can be found in the files section of
> the boost egroups:
>
> http://groups.yahoo.com/group/boost/files/PREPROCESSOR/
>
> We strongly encourage everyone to take some time to look at this library
> and post a review to the boost mailing list. The guidelines for writing a
> review can be found here:
>
> http://www.boost.org/more/formal_review_process.htm
>
> The following is a summary of the library.
>
> On Thu, 28 Jun 2001, Vesa Karvonen wrote:
> >
> > ### BEGIN LIBRARY DESCRIPTION ###
> >
> > PREPROCESSOR Library
> >
> > C++ programming sometimes involves repeating lists of template or
> > function parameters. Such repetition is troublesome, because it tends
> > to be done manually, which means that the maximum number of parameters
> > is bound into the design of the program making it difficult to
> > configure. Automating the repetition using extra linguistic tools
> > introduces another set of problems.
> >
> > The C preprocessor is part of the C++ language and can manipulate and
> > generate tokens. Unfortunately the C preprocessor is also a very low
> > level macro processor. In particular, it doesn't directly support
> > repetition or recursion. Fortunately it is possible to perform finite
> > repetition and recursion using a library of preprocessor primitives.
> >
> > The PREPROCESSOR library provides facilities for C preprocessor
> > metaprogramming. Preprocessor metaprogramming makes it possible to
> > generate function and template argument lists and make libraries
> > configurable through preprocessor definitions.
> >
> > ### END LIBRARY DESCRIPTION ###
> >
> >
> > ### BEGIN NOTABLE LIBRARY PRIMITIVES ###
> >
> > BOOST_PREPROCESSOR_UNUSED
> > Expands to nothing. Can be used as a macro parameter while generating,
for
> > instance, cv qualified functions.
> >
> > BOOST_PREPROCESSOR_CAT(LHS,RHS)
> > Delays the catenation of LHS and RHS making it possible to catenate
the
> > expansions of macros.
> >
> > BOOST_PREROCESSOR_REPEAT(N, M, P0, P1)
> > Repeats the macro M(I, P0, P1).
> >
> > BOOST_PREPROCESSOR_2ND_REPEAT(N, M, P0, P1)
> > Same as REPEAT but uses a separate implementation. Makes it possible
to
> > perform 2D repetition.
> >
> > BOOST_PREPROCESSOR_INC(X)
> > Increments X. Makes it possible to do primitive computation with the
> > preprocessor.
> >
> > BOOST_PREPROCESSOR_DEC(X)
> > Decrements X. Makes it possible to do primitive computation with the
> > preprocessor.
> >
> > BOOST_PREPROCESSOR_IF(C, THEN, ELSE)
> > Expands to THEN if C != 0 and ELSE if C == 0. Makes it possible to
special
> > case the first element of a list.
> >
> > BOOST_PREPROCESSOR_COMMA_IF(C)
> > Expands to a comma if C != 0 and nothing if C == 0. Makes it
convenient to
> > generate comma separated lists.
> >
> > BOOST_PREPROCESSOR_ENUM_PARAMS(N, PARAM)
> > BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT(N, PARAM, DEFAULT)
> > BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_DEFAULTS(N, PARAM, DEFAULT)
> > These macros facilitate generating parameter lists.
> >
> > BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS(N, PARAM)
> > This macro facilitates generating shifted parameter lists.
> >
> > ### END NOTABLE LIBRARY PRIMITIVES ###
>
> ----------------------------------------------------------------------
> Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
> Ph.D. Candidate, IU B'ton email: jsiek_at_[hidden]
> Summer Manager, AT&T Research phone: (973) 360-8185
> ----------------------------------------------------------------------
>
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


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