Function literals and value closures - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Rapport (Rapport Technique) Année : 2021

Function literals and value closures

Résumé

We propose the inclusion of simple lambda expressions into the C standard. We build on a slightly restricted syntax of that feature in C++. In particular, they only have immutable value captures, fully specified parameter types, and, based on N2735, the return type is inferred from return statements. This is part of a series of papers for the improvement of type-generic programming in C that has been introduced in N2638. Follow-up papers N2738 and N2737 will extend this feature with auto parameter types and lvalue captures, respectively.
Fichier principal
Vignette du fichier
n2736.pdf (752.79 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03106767 , version 1 (12-01-2021)
hal-03106767 , version 2 (10-06-2021)

Licence

Paternité

Identifiants

  • HAL Id : hal-03106767 , version 2

Citer

Jens Gustedt. Function literals and value closures: proposal for C23. [Technical Report] N2736, ISO JCT1/SC22/WG14. 2021, pp.55. ⟨hal-03106767v2⟩
82 Consultations
187 Téléchargements

Partager

Gmail Facebook X LinkedIn More