This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35527] New: function in template can depend on superclass
- From: "neleai at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Mar 2008 18:26:56 -0000
- Subject: [Bug c++/35527] New: function in template can depend on superclass
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When we want use template that inheriting custom class we get following error:
there are no arguments to 'aa' that depend on a template parameter, so a
declaration of 'aa' must be available
class A{
int aa(){return 42;}
};
template <int x ,typename t> class B : t{
int bb(){aa()+x;}
};
int main(){
B <4,A> z;
}
--
Summary: function in template can depend on superclass
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neleai at seznam dot cz
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35527