HAL will be down for maintenance from Friday, June 10 at 4pm through Monday, June 13 at 9am. More information
Skip to Main content Skip to Navigation

Improve type generic programming: proposal for C23

Jens Gustedt 1
1 CAMUS - Compilation pour les Architectures MUlti-coeurS
Inria Nancy - Grand Est, ICube - Laboratoire des sciences de l'ingénieur, de l'informatique et de l'imagerie
Abstract : C already has a variaty of interfaces for type-generic programming, but lacks a systematic approach that provides type safety, strong ecapsulation and general usability. This paper is a summary paper for a series that provides improvements through N2735. type inference for variable definitions (auto feature) and function return N2736. function literals and value closures N2738. type-generic lambdas (with auto parameters) N2637. lvalue closures (pseudo-references for captures) The aim is to have a complete set of features that allows to easily specify and reuse type-generic code that can equally be used by applications or by library implementors. All this by remaining faithful to C’s efficient approach of static types and automatic (stack) allocation of local variables, by avoiding superfluous indirections and object aliasing, and by forcing no changes to existing ABI.
Document type :
Complete list of metadata

Contributor : Jens Gustedt Connect in order to contact the contributor
Submitted on : Thursday, June 10, 2021 - 10:46:12 AM
Last modification on : Thursday, December 2, 2021 - 3:16:57 AM


Files produced by the author(s)


  • HAL Id : hal-03106758, version 2


Jens Gustedt. Improve type generic programming: proposal for C23. [Technical Report] N2638, ISO JCT1/SC22/WG14. 2021, pp.82. ⟨hal-03106758v2⟩



Record views


Files downloads