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]

[Bug c++/44516] unclear error message for invalid operands to operator



------- Comment #1 from pinskia at gcc dot gnu dot org  2010-07-05 01:47 -------
Note I would keep GCC's wording as it is more correct with respect of C++. 
Though I would say what the types are.  This is true for any operator.  The
reason is that the user could overridden the operator for those types.

That is the following is valid C++ code:
struct WebService {  };
struct Server {  };

const Server &operator+= (Server const &server,  WebService const *a);

void addHTTPService(Server const &server, WebService const
*http) {
server += http;
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|unclear error message for   |unclear error message for
                   |invalid operands to binary  |invalid operands to operator
                   |operator                    |


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


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