Hi Petr,
I think that putting using Packet::writePayload; to these classes (which are derived from e.g. BitTorrent::Packets::Packet) would solve the “problem” - I’m just thinking, isn’t now impossible to call e.g. BitField::writePayload(); (the function from the Packet class) from the derived classes? Because if you create a new function of the same name, but with different signature in the base class and you implement only one of them in the derived class, the second one would be hidden by the first one and thus cannot be called. More details are here. I didn’t study these classes deeply, so correct me if I’m wrong.
Aha, that’s it! Even though the function overrides one of the virtual functions, it does hide the other virtual function by the same name. Would you please try adding
using PacketBase::readPayload();
using PacketBase::writePayload();
as you suggested, to e.g. class BitField and see if the warnings are gone? If yes, then I’ll modify the packet-gen templates to generate the two lines in all concrete packet classes.
Thanks in advance!
Peter
