This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13825] template instantiation fails due to substituting the wrong type for a parameter
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2004 05:28:32 -0000
- Subject: [Bug c++/13825] template instantiation fails due to substituting the wrong type for a parameter
- References: <20040123050818.13825.mps@sonartech.com.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-23 05:28 -------
No the code is invalid, yes the error message sucks but that has been fixed for 3.4:
input.cc:16: error: non-template `B1' used as template
input.cc:16: error: (use `B >::template B1' to indicate that it is a template)
input.cc:16: error: declaration does not declare anything
input.cc: In constructor `C::C()':
input.cc:18: error: class `C' does not have any field named `_b1'
Basically this line:
typename B <a_t>::B1 <a_t> _b1;
should be:
typename B <a_t>::template B1 <a_t> _b1;
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13825