Liste des Groupes | Revenir à cl c |
No it is not. C-style functions (or C++ functions for that matter) are not objects, and do not have calling operators. Built-in operators do not belong to a type, in the way that class operators do.You can assign a C-style function pointer to an auto function-object.
You missed the point entirely. Lambdas can be used in many ways like functions, and it is possible for one function (or lambda) to return a different function, and can be used for higher-order functions (functions that have functions as parameters or return types). They do not mean that C++ can treat functions as first-class objects, but they /do/ mean that you can get many of the effects you might want if C++ functions really were first-class objects.C-style functions and lambda-types are generically interchangeable.
Les messages affichés proviennent d'usenet.