Boost logo

Boost :

Subject: Re: [boost] [local] Review request
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2011-05-14 21:24:36

On Sat, May 14, 2011 at 9:06 PM, Mostafa <mostafa_working_away_at_[hidden]> wrote:
> On Sat, 14 May 2011 12:38:50 -0700, Lorenzo Caminiti <lorcaminiti_at_[hidden]>
> I just took a quick glance at the documentation to get an understanding of
> the library, and I have a suggestion/comment:
> 1) I suggest adding:
> #define WITH_DEFAULT , default
> #endif
> #define WITH_DEFAULT ) default
> #endif
> to the library.  I think it makes client code more readable if they define
> ENABLE_BOOST_LOCAL_VARIADIC_WITH_DEFAULT or its variant rather than just
> defining WITH_DEFAULT.

Something similar (at least for the variadic syntax) is suggest in one
of the docs examples -- see last example here:

However, Boost macro naming conventions will require this macro to be
named BOOST_LOCAL_WITH_DEFAULT if the macro were to be added to
Boost.Local. IMO, that name is too long defeating the increased
readability benefit. Therefore, I'd leave it up to programmers to
#define WITH_DEFAULT if they wish to do so as suggested by the above
doc example.

> 2) In you're email you mentioned that Boost.Local functions can be used with
> stl algorithms, is this noted in the web documentation?

Yes, it is mentioned in a few places starting at the very beginning of
the Introduction section (3rd bullet point from the top):

Here is a sketch of how Boost.Local implements passing local classes
as template parameters (normally not allowed in ISO C++):



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