$ 20.8.2 of the standard describes the INVOKE facility that is mostly used to describe how callables are called with variadic argument lists throughout the standard library:
Define INVOKE (f, t1, t2, ..., tN) as follows:
—
(t1.*f)(t2, ..., tN)
when f is a pointer to a member function of a class T and t1 is an object of type T or a reference to an object of type T or a reference to an object of a type derived from T;—
((*t1).*f)(t2, ..., tN)
when f is a pointer to a member function of a class T and t1 is not one of the types described in the previous item;—
t1.*f
when N == 1 and f is a pointer to member data of a class T and t1 is an object of type T or a reference to an object of type T or a reference to an object of a type derived from T;—
(*t1).*f
when N == 1 and f is a pointer to member data of a class T and t1 is not one of the types described in the previous item;—
f(t1, t2, ..., tN)
in all other cases.
What are the third and the fourth item for? As far as I can tell, they don't call f
even if f
is callable. What's the user case for them. Maybe it's a typo in the standard and *f()
was intended?