Two
derives from
One
. Both declare the function
funct1
. The declaration in
Two
hides the declaration in
One
, so it is no longer accessible.
EDIT1: I compiled it successfully, so I don't know what to tell you. It's poor practice to overload a function name this way, so I don't know if I'll keep playing with this.
EDIT2: See
this[
^]. Your
using
statement is for a class member, not a namespace, and the relevant explanation is
Using-declaration introduces a member of a base class into the derived class definition, such as to expose a protected member of base as public member of derived. In this case, nested-name-specifier must name a base class of the one being defined. If the name is the name of an overloaded member function of the base class, all base class member functions with that name are introduced. If the derived class already has a member with the same name, parameter list, and qualifications, the derived class member hides or overrides (doesn't conflict with) the member that is introduced from the base class.
I don't know how to interpret, in the last sentence,
hides or overrides (does not conflict with). Yours isn't a proper override, because the function isn't
virtual
. So the sentence seems to imply that it hides, but does not conflict with, the base class name. It makes no sense to me.