[Bug c++/16438] New: "template argument is required for <...>"
dheld at codelogicconsulting dot com
gcc-bugzilla@gcc.gnu.org
Thu Jul 8 16:21:00 GMT 2004
template <class P1>
struct X
{
template <typename T>
struct Y;
};
template <class P1, typename T>
struct X<P1>::Y
{
template <typename U>
struct r
{
typedef Y<U> other;
};
};
int main(void)
{
X<char>::Y<int>::r<char> x;
}
Note that the definition of Y has the wrong template nesting depth (according to
Comeau online), and that should be the diagnostic given (rather than the
misleading diagnostic given for r). This is the correct definition of Y:
template <class P1>
template <typename T>
struct X<P1>::Y
{
template <typename U>
struct r
{
typedef Y<U> other;
};
};
--
Summary: "template argument is required for <...>"
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dheld at codelogicconsulting dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16438
More information about the Gcc-bugs
mailing list