Answer the question
In order to leave comments, you need to log in
Accessing non-existing object properties
Actually, there was such a problem. There is some object Foo . It has getter and setter getBar / setBar respectively. Is it possible somehow to overload the -> operator to replace these functions? Yes, something like PHP's __get / __set method .
C C ++ is familiar rather superficially, therefore, such a question arose. My knowledge of overloading and working with the -> operator ends with container dereferencing.
ps It is necessary simply, so to speak, for yourself. For the sake of learning.
Updated
www.rsdn.ru/forum/cpp/2265191.1.aspx - everything I found on this topic. Basically what I need.
Answer the question
In order to leave comments, you need to log in
If for Visual C ++, then there is such an option: msdn.microsoft.com/ru-ru/library/yhfk0thd.aspx
I use the wiki
article when I want to know the availability of operators for overloading (not to climb into the standard).
Judging by this page, this is not available.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question