Re: Why can't I compile this unit?
Greg Comeau wrote:
However, there is a minority of cases
where the message might be misleading. So, the real question
is where to draw a line between verbosity and generality.
And it is not an easy question to answer.
It's not, but I'm curious where the line is "incorrect" here.
I don't say that the message from Cameau compiler was
incorrect or bad. It is actually better than MS compiler
message because of hinting questions, which are right most
of the time. I'm trying to say that MS message is not _that_
bad as Ulrich implies. Indeed, it's a sort of "low-level"
message ("missing token"). However, in both messages,
speaking in C++ terms, it requires some "implicit
conversion" in user's mind until he/she gets to real problem:
MS: missing ';' before 'token2' [, therefore something
before 'token2' wasn't interpreted as a type name, why is that?]
Cameau: 'pair' is not a template [, but I know it is a
template, so why is that message? oh, the question is right
about missing namespace!]
So, both messages are quite close while Cameau's is better a
bit because a) it says that 'token' was not interpreted as
template name and b) it makes a hint, which is useful most
of the time.
Alex