You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a member function that does not have an explicit object parameter is considered to have an extra first parameter, called the implicit object parameter, which represents the object for which the member function has been called.
[over.match.funcs.general] p4 says
where X is the class of which the function is a member and cv is the cv-qualification on the member function declaration.
Consider this example:
structA{
voidshow(){}
};
structB:A{
};
B bobj;
bobj.show();
In this case, the object for which the member function show is called is bobj that is of type B. [class.derived.general] p2 says
Members of a base class are also members of the derived class.
That is, show is also a member of class B. So, whether the type of the implicit object parameter is considered to be A& or B&? The intent should be the former. [over.match.funcs.general] p4 might be changed to
where X is the class of which the function is a direct member
For conversion functions that are implicit object member functions, the function is considered to be a direct member of the class of the implied object argument for the purpose of defining the type of the implicit object parameter.
For non-conversion functions that are implicit object member functions nominated by a using-declaration in a derived class, the function is considered to be a direct member of the derived class for the purpose of defining the type of the implicit object parameter.
The text was updated successfully, but these errors were encountered:
[over.match.funcs.general] p2 says
[over.match.funcs.general] p4 says
Consider this example:
In this case, the object for which the member function
show
is called isbobj
that is of typeB
. [class.derived.general] p2 saysThat is,
show
is also a member of classB
. So, whether the type of the implicit object parameter is considered to beA&
orB&
? The intent should be the former. [over.match.funcs.general] p4 might be changed toThe text was updated successfully, but these errors were encountered: