[Bug c++/17177] Can not explicitly call protected superclass constructor in method
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Tue Aug 24 22:45:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-08-24 22:45 -------
Protected members are only accessible in derived classes when called through this->,
not for any object. What you try is equivalent to
----------------
class C
{
protected:
void foo();
};
class D : public C
{
void bar ()
{
C c;
c.foo();
}
};
--------------------------------
which fails for the same reason.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17177
More information about the Gcc-bugs
mailing list