$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Fwd: boost::bind vs. boost::lambda::bind - bug]
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-12-29 14:39:58
AMDG
Chris Hite wrote:
>> 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:
> namespace Boost{
>     typedef char _1;
>     namespace Lambda{
>         typedef int _1;
>         //using namespace ::Boost;  //very naught.  don't do this!!!
>     }
> }
>
> void foo(){
>     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.
Boost.Bind includes the placeholders in the global namespace, not in 
namespace boost.
In Christ,
Steven Watanabe