Boost logo

Boost :

From: Vladimir Voinkov (voinkovv_at_[hidden])
Date: 2001-11-13 05:19:36

I've compiled:

int z = boost::bind(&X::f, _1, "hello")(x);


-----Original Message-----
From: David Abrahams [mailto:david.abrahams_at_[hidden]]
Sent: Tuesday, November 13, 2001 11:27 AM
To: boost
Cc: Peter Dimov
Subject: [boost] bind/mem_fn problem

The following short program doesn't compile:

#include <boost/bind.hpp>
struct X
    int f(const char*);
X x;
int y = boost::bind(&X::f, &x, _1)("hello"); // OK
int z = boost::bind(&X::f, _1, "hello")(&x); // not OK

Shouldn't it work?

  David Abrahams, C++ library designer for hire

        C++ Booster (
          email: david.abrahams_at_[hidden]

Info: Unsubscribe:

Your use of Yahoo! Groups is subject to

Boost list run by bdawes at, gregod at, cpdaniel at, john at