|
Boost : |
Subject: Re: [boost] Removing Bind placeholders from the global namespace
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-06-14 18:41:06
On Monday 15 June 2009 02:22:22 Steven Watanabe wrote:
> Given that boost::bind is also at the top level, I don't
> see a problem with putting bind's placeholders in boost::placeholders.
IMHO, that's not a good idea. If I'm not mistaken, the common tendency is to
move libraries from the boost namespace into their own namespaces, and I
embrace it. The boost::placeholders namespace indeed means something unified,
not something that belongs solely to bind. Unless we have a Boost.Placeholders
library, that is.
> It should only require a few template specializations to make
> Lambda and Phoenix recognize them.
Great! I think, it would solve a lot of problems that led to this topic.
> The only issue is
> that as Peter mentioned, _1 + _1 won't work.
I guess, in general it's not possible to interpret such expressions out of
context. We could add a make_lambda function to explicitly construct a
functional object out of a proto expression. Additionally, we could add member
functions to boost::function in order to automatically interpret proto
expressions as functional objects.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk