This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13825] template instantiation fails due to substituting the wrong type for a parameter


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]