public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35525] New: function in template can depend on superclass
@ 2008-03-10 16:54 neleai at seznam dot cz
2008-03-10 16:58 ` [Bug c++/35525] " pinskia at gcc dot gnu dot org
2008-03-10 18:29 ` pcarlini at suse dot de
0 siblings, 2 replies; 3+ messages in thread
From: neleai at seznam dot cz @ 2008-03-10 16:54 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/35525] function in template can depend on superclass
2008-03-10 16:54 [Bug c++/35525] New: function in template can depend on superclass neleai at seznam dot cz
@ 2008-03-10 16:58 ` pinskia at gcc dot gnu dot org
2008-03-10 18:29 ` pcarlini at suse dot de
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-10 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-03-10 16:57 -------
Read: http://gcc.gnu.org/gcc-3.4/changes.html
This code is invalid and the error message explains exactly why, The function
call is non dependent so it has to be available and cannot defined in a
dependent superclass.
Thanks,
Andrew Pinski
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35525
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/35525] function in template can depend on superclass
2008-03-10 16:54 [Bug c++/35525] New: function in template can depend on superclass neleai at seznam dot cz
2008-03-10 16:58 ` [Bug c++/35525] " pinskia at gcc dot gnu dot org
@ 2008-03-10 18:29 ` pcarlini at suse dot de
1 sibling, 0 replies; 3+ messages in thread
From: pcarlini at suse dot de @ 2008-03-10 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pcarlini at suse dot de 2008-03-10 18:28 -------
*** Bug 35527 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35525
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-10 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-10 16:54 [Bug c++/35525] New: function in template can depend on superclass neleai at seznam dot cz
2008-03-10 16:58 ` [Bug c++/35525] " pinskia at gcc dot gnu dot org
2008-03-10 18:29 ` pcarlini at suse dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).