[Development] operators as members or not
Glen Mabey
glen.mabey at swri.org
Thu Aug 15 05:11:20 CEST 2013
Hello,
I'm working on a couple of new classes and I wonder whether there is a policy (written or otherwise) on whether operators should be members or not.
In particular, this question has come up in
https://codereview.qt-project.org/#change,59605
and
https://codereview.qt-project.org/#change,60792
I am no C++ philosopher, but I understand that some authorities (like stackoverflow) have their reasons for asserting that operators should not be members -- they also cite some sources.
http://stackoverflow.com/questions/4421706/operator-overloading/4421729#4421729
Looks like Oliver Goffart did also weigh in on the issue, in 60792.
Is it possible that the Coding Conventions could be amended to indicate which way this issue should go, if only for new classes?
Thanks!
Glen Mabey
More information about the Development
mailing list