This is truly a standard match. The standard states that there must be a member of operator() , and that it has one template argument for each occurrence of auto in its paramater-declaration clause. There is no wording prohibiting them explicitly.
At the bottom of the line: the lambda call statement is just a normal function (template, if common).
For reference, the corresponding standard offer:
The closure type for a non-generic lambda expression has an inline function call (16.5.4), the parameters and return of which type are described by the lambda expressions param-declaration-clause and trailing-return-type, respectively. For a common lambda, the closure type has a publicly available built-in function, the call operator operator template (17.5.2), the list of template parameters consists of one invented type of the template parameter for each auto case in the lambdas-declaration-clause parameter, in appearance order. A recognized type template type is a parameter package if the corresponding parameter declaration declares the function parameter package (11.3.5). The return type and function parameters the function operator operator template is derived from the lambda expression trailing-return-type and the parameter-declaration-sentence, replacing each occurrence of auto in the declaration specifiers of the parameter-declaration-sentence with the name of the corresponding invented parameter template.
8.1.5.1/3 [expr.prim.lambda.closure] in N4659 (C ++ 17), underline mine.
Baum mit augen
source share