This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
problem with template members in classes with vbases (cvs g++)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: problem with template members in classes with vbases (cvs g++)
- From: scott snyder <snyder at fnal dot gov>
- Date: Tue, 30 May 2000 22:29:38 CDT
hi -
With today's cvs version of gcc (20000530) on a linux/386 platform,
i get an error trying to compile the following source:
-- x.cc -----------------------------------------------------
class d0_Collection_Base {};
template <class T>
class d0_List
: virtual public d0_Collection_Base
{
public:
d0_List () {}
template <class Input_Iterator>
d0_List (Input_Iterator first, Input_Iterator last)
;
};
void tlist ()
{
const d0_List<int> l4 (1, 2);
}
-------------------------------------------------------------
$ ./cc1plus -quiet x.cc
x.cc: In function `void tlist ()':
x.cc:17: no matching function for call to `d0_List<int>::d0_List (int,
int)'
x.cc:8: candidates are: d0_List<T>::d0_List () [with T = int]
x.cc:6: d0_List<int>::d0_List (const d0_List<int> &)
Note that this error goes away if i remove the `virtual' keyword
in this example.
thanks,
sss