これが機能しないのはなぜですか(Visual C ++ 2012 Update 1)、それを修正する適切な方法は何ですか?
#include <boost/lambda/bind.hpp>
namespace bll = boost::lambda;
struct Adder
{
int m;
Adder(int m = 0) : m(m) { }
int foo(int n) const { return m + n; }
};
#define bindm(obj, f, ...) bind(&decltype(obj)::f, obj, __VA_ARGS__)
int main()
{
return bll::bindm(Adder(5), foo, bll::_1)(5);
}