This is the mail archive of the gcc-bugs@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: c++/7016: missing definitions for <?= and >?=


bangerth@dealii.org wrote:-

>     This is probably a corner case whether I should close the
>     report: this has never worked (used to ICE)
>     ---------------------------------
>     class C {};
>     C operator <?= (C) { return C(); }
>     --------------------------------------
>     I don't think it was ever documented that one should be
>     able to overload this operator (a gcc extension anyway).
>     Now we at least get a reasonable error:
>     g/a> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
>     x.cc:2: error: expected identifier
>     x.cc:2: error: expected type-name
>     x.cc:2: error: expected `,' or `;'
>     
>     So the fact that the new parser rejects the code is ok, and
>     is not removing a documented extension.

The documentation should say one way or the other.  FWIW to me
allowing overloading is TRT.

Neil.


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