Peter Dimov wrote:
Daniel Boelzle wrote:
Hello,
I have problems using wonderful boost::bind with __cdecl member functions like the following:
#include
struct S { void __cdecl foo( int ); }; <snip> This can only happen if your default calling convention is something other than __cdecl. This is very rare and boost::bind does not provide explicit support for __cdecl, relying on it being the default. <snip>
This is not correct. For non-static member functions the default calling convention is "thiscall" which is more efficient than "cdecl" (the "this" pointer is passed in a register, and the called function increments the return stack pointer over the arguments). Personally I don't see the point in changing the calling convention for a non-static member function. Ben.