Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind] code sample crashing MS compiler
From: Alexander Gutenev (gutenev_at_[hidden])
Date: 2008-12-21 16:32:16


There's an issue with pointer to member functions.

Here's what I've traced boost bind error to:

template<class F> void g(F f){};
struct S { void m(){}; };
int _tmain(int argc, _TCHAR* argv[])
{
  S s;
  g(s.*&S::m);
 return 0;
}

Here's a looking like legal code that fails to compile with the same crash:

class foo;
template<int(foo::*)()>
struct bar{};
class foo
{
  virtual int method(){}
  bar<&foo::method> foobar;
};


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