Overloading operator -> for const member functions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rama270
    New Member
    • Nov 2006
    • 1

    #1

    Overloading operator -> for const member functions

    Problem:
    The operator -> is overloaded thus
    Class * operator-> () { return this; }

    but this causes a problem for const member functions . The purpose of overloading is that both . and -> can be used .

    Is there a way out for const member function ?
Working...