Boost logo

Boost :

From: Steve Anichini (sanichin_at_[hidden])
Date: 2001-11-05 20:33:54


> From: Peter Dimov [mailto:pdimov_at_[hidden]]
> [...]
> > A __stdcall member function pointer looks like this:
> > typedef void (__stdcall T::*SomeMemberFunctionPtr)();
>
> I've somehow managed to miss the fact that __stdcall can be applied to
> member pointers, too (they usually use __thiscall); thank you for pointing
> this out.

No problem

> [...]
> I think I have a better solution. Currently mf0 is defined like this:
> [...]
> This can be trivially extended to handle any "pointer to member" type:
>
> template<class R, class T, class F = R (T::*) ()> class mf0
> {
> public:
>
> typedef R result_type;
> typedef T * first_argument_type;
>
> private:
>
> F f_;
>
> public:
> // omitted
> };
>
> What do you think? Let's hope that this change won't break anything. I'll
> fix mem_fn.hpp after 1.25.1 is released.

This syntax doesn't compile for me under VC++ 6 - it doesn't like the
specification of the function pointer type in the template args list,
produces "error C2653: 'T' : is not a class or namespace name".

-steve anichini


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk