The constexpr specifier for object definitions - Archive ouverte HAL Access content directly
Reports Year : 2022

The constexpr specifier for object definitions

Alex Gilding
  • Function : Author

Abstract

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 and versions

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

Licence

Attribution - CC BY 4.0

Identifiers

  • HAL Id : hal-03799921 , version 1

Cite

Alex Gilding, Jens Gustedt. The constexpr specifier for object definitions. [Research Report] N3018, ISO JCT1/SC22/WG14. 2022. ⟨hal-03799921⟩
1 View
0 Download

Share

Gmail Facebook Twitter LinkedIn More