Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-11-29 16:10:46

Stefan Slapeta wrote:
> I wonder if it makes sense to write an additional header for
> boost.bind (and maybe boost.function) that provides the library
> interfaces meeting the 'modern' boost requirements, i.e.:

I'm really not sure what do you mean by "modern" boost requirements.

> a) this header should be placed in the bind subdirectory, e.g.
> boost/bind/bind.hpp

What purpose does that serve? Why not boost/bind/bind/bind.hpp?

> b) this header should introduce a separate namespace 'bind' or
> 'function' to avoid the well-known namespace clashes with
> boost::lambda that are _really_ annoying.

Again, what purpose would that serve? The only name that bind.hpp "reserves"
in boost is 'bind'. Defining a namespace 'bind' still reserves the same name
in boost, namely, 'bind', except that user code is now uglier.

> c) this header should not declare the placeholders in an anomymous
> namespace. (I don't know what was the intention behind that but it
> makes it impossible to write 'using boost::_1')

The original intent has been to make the placeholders globally available. As
identifiers that start with an underscore are not allowed at the global
namespace, and since defining a variable in a header would cause link
errors, the placeholders have been put in an unnamed namespace.

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