|
Boost Users : |
Subject: [Boost-users] [bind] apply and member function
From: Tore Halvorsen (tore.halvorsen_at_[hidden])
Date: 2010-11-19 03:35:57
Hi,
Is boost::apply supposed to work with member functions?
#include <boost/bind.hpp>
#include <boost/bind/apply.hpp>
struct foo
{
void bar()
{
}
};
void quux(foo* fp)
{
}
int main(int argc, char* argv[])
{
foo f;
foo* fp(&f);
// Works as expected
boost::bind(boost::apply<void>(), _1, fp)(&quux);
// Fails to compile
boost::bind(boost::apply<void>(), _1, fp)(&foo::bar);
}
-- Eld på åren og sol på eng gjer mannen fegen og fjåg. [Jøtul] <demo> 2010 Tore Halvorsen || +052 0553034554
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