Re: A member pointer to a member function? - Followup Question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Carl Daniel [VC++ MVP] (cpdaniel_remove_this_and_nospam_at_mvps.org.nospam)
Date: 11/08/04


Date: Sun, 7 Nov 2004 16:12:04 -0800

Ray Mitchell wrote:
> Is there a way to achieve the syntax I want?

I don't think so, no. Invoking through a pointer to member function is just
ugly - especially when the pmf in question is itself a member of the object
on which you invoke the function.

-cd



Relevant Pages

  • Re: Function Pointer Query
    ... Note that pointer to member function is incompatible with regular ... needs a callback, you are sadly out of luck. ... void EnumWindows; ...
    (microsoft.public.vc.language)
  • Re: Why pointer to member function?
    ... I want a simple,clean,cheap way that can save the member function ... fixed for any type of closure. ... don't want to save a pointer to a pointer to a member function ... the boost lib does prove that I'm not wrong on this. ...
    (comp.lang.cpp)
  • Re: c[++] pointer question
    ... A pointer is a variable that contains a memory address. ... The above are member variables. ... A constructor is a special member function that is meant to initialize ... In modern C++ the initialization is better done via an initializer list, ...
    (comp.lang.cpp)
  • error C2276; passing &member function to _beginthreadex
    ... member function as "static" but I've not been able to find a compile-able ... syntax by going down that road. ... i.e. a reference to the class object itself, and that therefore when passing ... Apologies if I've missed out any code here - suffice to say it all compiles ...
    (microsoft.public.vc.language)
  • Re: Static member functions in VC
    ... What I want to achieve is NON static member function to be assigned as ... It is exactly right that it HAS TO contain pointer to an object itself. ... as Microsoft hasn't implemented any common solution of this problem in VC++ ... > instance pointer and a pointer to member function, ...
    (microsoft.public.vc.language)