public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16438] New: "template argument is required for <...>"
@ 2004-07-08 16:21 dheld at codelogicconsulting dot com
2004-07-09 4:07 ` [Bug c++/16438] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: dheld at codelogicconsulting dot com @ 2004-07-08 16:21 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/16438] "template argument is required for <...>"
2004-07-08 16:21 [Bug c++/16438] New: "template argument is required for <...>" dheld at codelogicconsulting dot com
@ 2004-07-09 4:07 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-09 4:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-09 04:07 -------
Fixed for 3.4.0:
pr16438.cc:10: error: too few template-parameter-lists
pr16438.cc: In function `int main()':
pr16438.cc:20: error: incomplete type `X<char>::Y<int>' used in nested name specifier
pr16438.cc:20: error: expected primary-expression before "char"
pr16438.cc:20: error: expected `;' before "char"
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |diagnostic
Resolution| |FIXED
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16438
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-09 4:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08 16:21 [Bug c++/16438] New: "template argument is required for <...>" dheld at codelogicconsulting dot com
2004-07-09 4:07 ` [Bug c++/16438] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).