This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Volatile MEMs in statement expressions and functions inlined as trees


Linus Torvalds <torvalds@transmeta.com> writes:

[...]

| > So I think (and this time I'm _positive_ that Gabriel will agree) that the
| > C++ assignment rules only cover the _standard_ assignments, not the ones
| > you come up with yourself by overloading the operator.

If by "standard assignments" you understand *also* the implicitly
generated copy and assignment operator, then I agree.

Alexandre Oliva <aoliva@redhat.com> writes:

| > PS. I don't know whether there is an "Obfuscated C++" competition or not,
| > but if there is, overloading of operators should be banned
| 
| Then you pretty much can't use iostreams, vectors, valarrays and many
| other standard components of the C++ library.  Like it or not,
| operator overloading is used a lot in the standard language, and for
| good, IMO.

I'm wondering if a C++ program with no overloaded operator is still a
C++ program ;-)

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]