This is the mail archive of the gcc@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]

Re: C++ Error message question and suggestion.


> What does "`const basic_rcon::pair *' is not a class, struct, or union
> type" as given by:
[...]
> suppose to mean?

Exactly that: const basic_rcon::pair * is a "pointer type", and
neither a struct, nor a class, nor a union. And - it should be, in the
place where you use it - which is a qualification in a template
instantiation, such as

template<class T>
struct S{
  typename T::foo::bar x;
};

struct A{
  typedef int foo;
};

S<A> X;

Here, template S assumes that T::foo is a class, struct, or union type
which has a nested type "bar" - however, T::foo is `int', hence the
error.

> Has any one considered an option to produce better formatted error
> messages.

Not to my knowledge, no. There have been numerous proposals for
improving the error messages, but none that deals with reformatting
them to be more readable. If you can find an algorithm that makes it
more readable, a patch to the compiler would be most welcome.

Regards,
Martin


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