------- Comment #27 from pcarlini at suse dot de  2006-04-20 23:10 -------
(In reply to comment #23)
> Actually I don't see why the comma operator can be overridden in C++ (yes this
> I am raising a question about why the standards says it can).

Well, if we are talking about rationale and programming style, then authors
like Lippman/Lajoie/Moo in general advice against overloading operator,
(14.1.1).

But really, now the point seems to me rather clear: it is essentially
impossible to "protect" the library vs all the possible operator overloadings
in global namespace (consider also things like operator|| and operator&&)
together with unrestricted templates (thus "enabled" not only for user defined
types): if the user does that then has to accept the behavior he gets.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26974

Reply via email to