The constexpr specifier for object definitions - Ecole Nationale du Génie de l'Eau et de l'Environnement de Strasbourg Accéder directement au contenu
Rapport Année : 2022

The constexpr specifier for object definitions

Alex Gilding
  • Fonction : Auteur

Résumé

C++ has supported translation-time definition of first-class named constants for over ten years, while C, for all types besides int, is still limited to using second-class language features, in particular macros, during translation. This puts C at a significant disadvantage in terms of being able to share the same features between runtime and translation, and in being able to assert truths about the program during translation rather than waiting to assert in a runtime debug build.
n3018.htm (82.8 Ko) Télécharger le fichier

Dates et versions

hal-03799921 , version 1 (06-10-2022)

Licence

Paternité

Identifiants

  • HAL Id : hal-03799921 , version 1

Citer

Alex Gilding, Jens Gustedt. The constexpr specifier for object definitions. [Research Report] N3018, ISO JCT1/SC22/WG14. 2022. ⟨hal-03799921⟩
18 Consultations
0 Téléchargements

Partager

Gmail Facebook X LinkedIn More