I’m having difficulty understanding this:
It is well known that assignment operator won’t be inherited directly… I’ve asked this yesterday LINK
AFAIK following non-virtual operators won’t be inherited as well:
operator& //unary user defined
operator* //unary user defined
all other operators will be inherited( correct me if I’m wrong )
Which virtual operators won’t be inherited? (does virtual specifier make any difference?)
Strictly speaking, everything is inherited. However, the following will be hidden in the derived class by implicitly-declared versions (or user-declared versions, if the user declares them):
T()~T()T(T const &)(sometimes withoutconst)T & operator=(T const &)(sometimes withoutconst)T(T &&)T & operator=(T &&)operator&andoperator*are inherited like everything else.virtualdeclarations make no difference.