Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualParadigm Shifter

Posted 24 March 2013 - 02:10 PM

I'll bow to others knowledge about it being undefined.

 

The simple and obvious implementation however shouldn't dereference anything at the point of calling the function. Inside the function you are toast if you do dereference this.

 

I could imagine some implementations doing some extra work (maybe in a debug configuration) which does attempt to use the this pointer for a simple member function call (logging, etc.).

 

Don't do it anyway, it's asking for trouble.

 

EDIT: And the code posted shouldn't compile ;) A::say isn't public ;)


#1Paradigm Shifter

Posted 24 March 2013 - 02:03 PM

I'll bow to others knowledge about it being undefined.

 

The simple and obvious implementation however shouldn't dereference anything at the point of calling the function. Inside the function you are toast if you do dereference this.

 

I could imagine some implementations doing some extra work (maybe in a debug configuration) which does attempt to use the this pointer for a simple member function call (logging, etc.).

 

Don't do it anyway, it's asking for trouble.


PARTNERS