Boost logo

Boost :

Subject: Re: [boost] [local] Review request
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-05-16 09:28:48

Mostafa-6 wrote:
> On Sun, 15 May 2011 11:47:12 -0700, Lorenzo Caminiti
> <lorcaminiti_at_[hidden]> wrote:
>> Boost will require this macro to be named BOOST_LOCAL_WITH_DEFAULT
>> even if it is controlled by the
>> switch:
> Oh, ok, I now see what you're saying. Thanks for the clarification.
>> I found this macro names to be longer and less readable than ",
>> default x" or ")(default x" so I decided not to add
>> BOOST_LOCAL_WITH_DEFAULT to the library defined macros. I simply to
>> suggest in the library docs that programmers can define this macro if
>> they find it readable. If during the review also other programmers
>> request to add BOOST_LOCAL_WITH_DEFAULT, I am happy to consider it.
> Yes, given your earlier clarification, I agree with you on the readability
> issue. However, I still see a use case for it, not as is, rather, the
> case where clients would just alias to WITH_DEFAULT.

Even if defining macros as follow might "feel" strange to programmers
because of the leading "," or ")(":

#define WITH_DEFAULT , default // (1)


#define WITH_DEFAULT )(default // (2)

The leading ", default ..." and ")(default ..." is part of Boost.Local
public API so I think that Boost.Local users should be expected to be
familiar with it. Therefore, I don't see a need for aliasing WITH_DEFAULT to
a pre-defined BOOST_LOCAL_WITH_DEFAULT macro:


I would just expect programmers to define (1) or (2) directly if they feel
these are more readable than using ", default ..." or ")(default ..." (I
personally find the WITH_DEFAULT macro not useful at all but I am very used
to use the "default" syntax).

BTW, based on our discussion, I will add (2) to the library docs for
completeness (right now only (1) is mentioned).

> So please consider this my request for such an addition, in case I
> forget/don't participate
> in the review.

Yes, let's discuss more during the review together with other people that
will be experimenting with the library.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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