This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
public method hidden by protected one
- From: "Francois Coulon" <francois dot coulon at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 26 Nov 2007 10:51:43 +0100
- Subject: public method hidden by protected one
We have thos two declarations in a class :
public:
const DonneesCP & getDonneesCP() const ;
protected:
DonneesCP &getDonneesCP();
We try to call the public one from outside the class, we have this error :
/vobs/ERATO/SMET/SAD/PUB/Linux-x86_64/include/DonneesCP/InterfaceDonneesCP.hpp:320:
error: « erato::DonneesCP& erato::InterfaceDonneesCP::getDonneesCP() »
is protected
/vobs/ERATO/APP/OTDA/TUFA/src/TUFA/tuf.cpp:117: error: within this context
If we remove the protected method, the error dissappears.
Is this normal behaviour or not ?
Thanks in advance