[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: Non-inline constructor definition of internal template class in another template class, fails.
From: Carlo Wood <carlo () runaway ! xs4all ! nl>
Date: 1999-10-05 14:33:08
[Download RAW message or body]
Hi,
I suppose this is a bug?
~/c++/tests>g++ -c specialization.cc
specialization.cc:12: new declaration `A<T>::I<U>::I()'
specialization.cc:6: ambiguates old declaration `A<T>::I<U>::I()'
(I didn't even get to the specialization yet)
specialization.cc:
-----------------------------
template<class T>
class A {
template<class U>
class I {
public:
I(void); // specialization.cc:6
};
};
template<class T>
template<class U>
A<T>::I<U>::I(void) { } // specialization.cc:12
------------------------------
Note that this works fine when:
* you replace `I(void)' by `x(void)', or
* when class A isn't a template, or
* when you put the definition of I(void) ({ }) inline in its class.
Again: egcs-1.1.2 release.
Please let me know if it is fixed in a later version; I will upgrade
this time :/ (if only to stop bugging you with old bugs).
--
Carlo Wood <carlo@runaway.xs4all.nl>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic