Boost Users :
Subject: Re: [Boost-users] [Fwd: boost::bind vs. boost::lambda::bind - bug]
From: Chris Hite (C.Hite_at_[hidden])
Date: 2009-12-29 14:18:58
> You've created a conflict among the placeholders. Both bind and lambda::bind
> declare _1. bind declares its placeholders at global scope, but
> lambda includes in the lambda namespace.
My using the inner namespace shouldn't include the outer namespace
unless somewhere in the lambda namespace there's a using ::boost. I
would consider that to be namespacing bug. For example using
boost::lambda shouldn't put shared_ptr in scope either.
Consider the following example code:
typedef char _1;
typedef int _1;
//using namespace ::Boost; //very naught. don't do this!!!
using namespace Boost::Lambda;
_1 i; //fine as long as the using line above is commented out
Somewhere in the boost::lambda namespace there is a using namespace
boost. I can't find it though.
> There has been talk about merging these, but I'm not sure the status
> is. Of course, with bind becoming part of the standard that may be
> -- Bill --
Thanks Bill. Maybe lambda can use the same placeholders as the
standard. After all the placeholders are just zero sized tags. As soon
as meta functions are standardized that work on them lambda could
probably use them.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net