Boost logo

Boost :

Subject: [boost] [local] couple questions
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-05-26 18:52:32

1) I notice from

that (proposed) Boost.Local has a dependency on Boost.ScopeExit. It seems
that Boost.Local provides all the functionality of Boost.ScopeExit, and then
some; at least, that's what seems to be implied by

It would seem reasonable then, maybe, should Boost.Local be accepted, to
remove the dependence on Boost.ScopeExit and officially deprecate
Boost.ScopeExit in favor of Boost.Local's BOOST_LOCAL_EXIT:

What are your (you = Lorenzo or anyone else) thoughts regarding that
development path?

2) I haven't read through the docs in *too* much detail yet, but I would
guess from, for example,

that copying a Boost.Local functor amounts to something less than a deep
copy, and possibly an entirely shallow copy. In other words, does

int x = 0;
void BOOST_LOCAL_FUNCTION_PARAMS( bind(int) x ) { // bind x by value, so a
copy is taken...
    std::cout << ++x << std::endl;

boost::function< void ( ) > g(f);


print "1" followed by "2" (my guess), or does it print "1" twice? I may
have missed it entirely, but I'd like the semantics of copying a Boost.Local
functor explicitly spelled out.

P.S.: I noticed in

a misspelling in the comments of the last example,

- Jeff

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