[Bug c++/35525] New: function in template can depend on superclass

neleai at seznam dot cz gcc-bugzilla@gcc.gnu.org
Mon Mar 10 16:54:00 GMT 2008


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=35525



More information about the Gcc-bugs mailing list