This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24592] Static_cast loses access to protected
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2005 10:32:53 -0000
- Subject: [Bug c++/24592] Static_cast loses access to protected
- References: <bug-24592-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from igodard at pacbell dot net 2005-10-31 10:32 -------
Sorry, screwed up the explanation. Should be:
The access to "inc" is "s->inc()". "s" is a "F<T>*", which after parameter
substitution is a "G<int>*". "b1<T>" is a public base of G<T>, which after
substitution means that "b1<int>" is a public base of "G<int>" and so is
also a public base of "s". Hence the protected member "b1<int>::inc" should be
visible via "s", but is not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24592