Boost logo

Boost Users :

Subject: [Boost-users] [Fwd: boost::bind vs. boost::lambda::bind - bug]
From: Chris Hite (C.Hite_at_[hidden])
Date: 2009-12-29 10:25:04

The code below fails to compile on g++ (GCC) 3.4.3:

lambda_bind_test.cxx:9: error: `_1' undeclared (first use this function)
lambda_bind_test.cxx:9: error: (Each undeclared identifier is reported
only once for each function it appears in.)

Commenting the include of boost::bind fixes it. How can the second
header hide types defined in the first header?

Shall I report a bug in trac or reopen this one?:

Is there any way in the long run the two libraries could be unified?
All the asio examples use boost::bind? Should developers starting out a
new code base use just one? Which one?

#include <boost/lambda/bind.hpp>
#include <boost/bind.hpp> //comment this line out and it compiles

int foo(const char*);

void test(){
    using namespace boost::lambda;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at