bugreport gcc on linux
llewelly@dbritsch.dsl.xmission.com
llewelly@dbritsch.dsl.xmission.com
Tue Jun 20 16:44:00 GMT 2000
gcc 2.95.2 says:
myvectorbasis.cc: In method `myvektorbasis<T>::myvektorbasis(typename
myvektorbasis<T>::size_type, const T & = T())':
myvectorbasis.cc:18: class `myvektorbasis<T>' does not have any field
named `vector'
So the bug is fixed. I suggest you upgrade.
Note that your use of 'vector(n,value)' on line 18 is ill-formed; the
template parameters of a class template name can only be elided in the
declaration of the class template. 'vector<T>(n,value)' would be
correct.
Thank you for your bug report.
[snip]
> #include <iostream.h>
> #include <stdlib.h>
> #include <vector.h>
>
> template<typename T = float>
> class myvektorbasis
> : public vector<T>
> {
> public:
> myvektorbasis();
> myvektorbasis(size_type n, const T& value = T() );
> ~myvektorbasis();
> };
>
> template<typename T> myvektorbasis<T>::myvektorbasis(){
> }
>
> template<typename T> myvektorbasis<T>::myvektorbasis(size_type n, const
T& value ): vector(n,value)
> {
>
> }
>
>
> template<typename T> myvektorbasis<T>::~myvektorbasis(){
> }
>
>
> template class myvektorbasis<double>;
> //template class myvektorbasis;
> myvektorbasis<int> ab;
>
> int main(int argc, char *argv[])
> {
> cout << "Hello, World!" << endl;
>
> return EXIT_SUCCESS;
> }
>
[snip]
More information about the Gcc-bugs
mailing list