This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]