Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-04-11 23:19:13


Aleksey Gurtovoy wrote:

> to this one
>
> METACOMM_FORWARDING_CONSTRUCTORS(
> 10
> , heap_storage
> , ( :, m_object, (, new T (, (0), ), ), {,} )
> )
>
> The former seems much easier to comprehend even although it's
> definitely
> more verbose. YMMV, of course.

This is not how it would be, though. The only things that must be separated are
calls to macros and various types of escapes that you might want to use. (0) is
an escape. It would actually look like this:

( : m_object, CHAOS_PP_CLOSED( new T, CHAOS_PP_CLOSED( (0) ) ), { } )

I.e. you only have to have commas separating special escape sequences such as
(0). The macro CHAOS_PP_CLOSED is an operator used to build the lambda
expression in certain contexts. However, the mechanism is designed to closely
match the syntax of the preprocessor, not the syntax of the core language. E.g.
the expression above expands to something that looks like this:

( : m_object, (0L), new T, (0L), (0), (0R), (0R), { } )

..which is directly usable, but harder to work with, IMO.

Paul Mensonides


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