|
Boost : |
From: Richard Hadsell (hadsell_at_[hidden])
Date: 2007-05-11 12:08:00
Peter Bindels wrote:
>I was wondering, why is overloading operator. (period) forbidden? It
>would make a few odd applications possible (dynamic inheritance and
>transparent remote method invocation spring to my mind) and it would
>be fairly generic. The only sidecase I can see is that operator.
>itself would not be looked up through operator. .
>
>I read that there was previous debate on the subject, but I haven't
>been able to find why it was rejected.
>
>
This is a bit off-topic, but you might consult Stroustrup. In his "The
C++ Programming Language" (3rd or Special edition) he says in section
11.2, in reference to operator. and 2 others that can't be overloaded:
"They take a name, rather than a value, as their second operand and
provide the means of referring to members. Allowing them to be
overloaded would lead to subtleties." And he refers to his "The Design
and Evolution of C++" (Addison-Wesley, 1994).
-- Dick Hadsell 914-259-6320 Fax: 914-259-6499 Reply-to: hadsell_at_[hidden] Blue Sky Studios http://www.blueskystudios.com 44 South Broadway, White Plains, NY 10601
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk