Bug 35527 - function in template can depend on superclass
Summary: function in template can depend on superclass
Status: RESOLVED DUPLICATE of bug 35525
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-10 18:26 UTC by Ondrej Bilka
Modified: 2008-03-10 18:28 UTC (History)
1 user (show)

See Also:
Host:
Target: i486-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Bilka 2008-03-10 18:26:55 UTC
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;
}
Comment 1 Paolo Carlini 2008-03-10 18:28:33 UTC

*** This bug has been marked as a duplicate of 35525 ***