This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16438] New: "template argument is required for <...>"
- From: "dheld at codelogicconsulting dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2004 16:21:18 -0000
- Subject: [Bug c++/16438] New: "template argument is required for <...>"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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