[Bug c++/24607] New: poor diagnostic

igodard at pacbell dot net gcc-bugzilla@gcc.gnu.org
Tue Nov 1 05:19:00 GMT 2005


template<typename T> class A{};
template<typename T> class B{};
template<typename T> class C{};
template<typename T> class D{};
template<typename T> class E{};
template<typename T> void f() {
typedef A<typename B<D<E<int> > > > foo;
}


gets you:

~/ootbc/members/src$ g++ foo.cc
foo.cc: In function `void f()':
foo.cc:7: error: template argument 1 is invalid
foo.cc:7: error: ISO C++ forbids declaration of `foo' with no type


In template metaprogramming spaghetti, it would sure help if the diagnostic
said just *which* template invocation had argument trouble.

Ivan


-- 
           Summary: poor diagnostic
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


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



More information about the Gcc-bugs mailing list