|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-09 10:51:27
Daniel Boelzle wrote:
> Hello Peter,
>
>> 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.
>
> I am not forcing any specific calling convention: no /Gz (stdcall),
> /Gr (fastcall), nor /Gd (__cdecl) on my command line.
> MSDN documents that __cdecl is the default for vararg member
> functions, but thiscall for non-vararg member functions.
Yes, you're right, I missed this.
> The reason for decorating member functions with __cdecl is to get
> independent of the above mentioned switches when including those
> header files (thiscall cannot be specified, no keyword).
If you decorate a member function with __cdecl, you are making it __cdecl.
If you don't decorate it, it will be __thiscall by default, regardless of
/G?. So I don't think you should use __cdecl here unless you really want the
"this" pointer pushed on the stack.
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