Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-10-10 06:35:03


Stuart Dootson <stuart.dootson_at_[hidden]> writes:

> On Sat, 9 Oct 2004 13:59:49 -0600, Brian Braatz <brianb_at_[hidden]> wrote:
>> I have searched the list archive and have not found anything on this
>> subject.
>>
>> I have what looks like to be an issue with MSVC7.1 and unnamed
>> namespaces
>> (the _1 _2 and _3 are in unnamed namespaces in boost::lambda)
>
> I think you'll find the issue is that you've got #include's for bind
> and lambda, both of which inject argument placeholders (_1 etc) into
> the root namespace - both Boost.Bind and Boost.Lambda give you
> function binders (see
> http://www.boost.org/libs/lambda/doc/ar01s08.html#id2828068). Remove
> the include of bind.hpp and you're sorted.

That will fix the problem, but IIRC you have the cause wrong.

Boost.Bind puts its placeholders into an unnamed namespace at the top
level. Lambda puts them in boost::lambda, but there's a
using-directive for boost::lambda there in the OP's code.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk