This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Degraded C++ error messages.


Carlo Wood <carlo@alinoe.com> writes:

| For example;  suppose we have the following code:
| 
| 
|   x = y + z - r;  g = h - k * i;
| 
| Type of problem occuring: a binary expression for two types 
| is requested that does not exist.
| Information need: "No such function (alternatives: ..."
|                   "Name of binary expression"
| 		  "Very short reference to the two elements
| 		   involved."
| For example:
| error: No such function: operator-(std::string&, float&) in `h - k * i'

This supposes std::string& and float& accurately captures the operands
and the type of the operator (which is assumed here to be non-member).

  No matching function 'operator-' in 'h - k + i' for operands 'h' ofr
  type "..." and 'k * i' of type.

It is tempting to describe C++ expressions in terms of types; it might
work in small.  It does not  scale behond trivial cases, and shows up
in diagnostics in interesting cases.

-- Gaby


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