Boost logo

Boost Users :

Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Eric Niebler (eric_at_[hidden])
Date: 2011-04-06 06:53:13


On 4/6/2011 5:12 AM, Peter Dimov wrote:
> Eric Niebler wrote:
>> Yuk. Is it ever desirable for an argument of type boost::function to
>> cause lookup in namespace boost? Probably not, right? That would argue
>> for moving boost::function into an ADL-blocker namespace.
>
> Nothing here is specific to boost::function. By this same logic, nothing
> should ever be in namespace boost.

Precisely. :-)

> You could very well make the case that, indeed, nothing but
> subnamespaces should be in boost.

I'm not making that case, exactly. I'm saying that boost::function
should actually be defined in boost::function_adl_block and be imported
into the boost namespace with a using declaration.

> In most circumstances you would be
> right. But the reason everything is in boost is that everything that is
> accepted into the standard would move into std, and putting everything
> in boost allows us to catch problems that would in any case occur when
> the components are placed in std. And in fact, the original problem
> presents itself with std::function (or std::anything else, for that
> matter) and std::bind as well.

Are you saying that Boost can never improve on what's in the standard? I
see no reason for boost::function to be bug-for-bug compatible with
std::function.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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