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);

Vladimir

-----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
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          email: david.abrahams_at_[hidden]
===================================================

Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


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