Boost logo

Boost Users :

From: Stephen Gross (sgross_at_[hidden])
Date: 2006-02-03 10:00:13


I'm trying to figure out the correct syntax for boost::bind-ing a static
member function with some arguments preset. For example:

============================
struct Foo
{
  static double go(int x, int y) { return x + y; }
}

typedef ... functortype;

functortype f = boost::bind(&Foo::go, _1, boost::constant(3));

f(3);
============================

The actual code I have is a little different; I've simplified it as the
above example. At compile time, the compiler complains that it can't find a
matching call for 'f(3)'. Any ideas? I can post the complete example,
obviously, if that's necessary. Is my syntax for the bind statement correct?

Thanks in advance,
--Steve

Stephen Gross
Case Western School of Medicine
Cleveland, OH

"By Grabthar's hammer, by the sons of Worvan, you shall be avenged." - Dr.
Lazarus


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