Re:New C features in GCC 13
by peterfirefly on Thursday May 04, 2023 @09:05AM
(#35814633)
constexpr is also ridiculously simple to implement -- because the existing compilers already do something similar internally for all enumeration constants.
(Enumeration constants are the identifiers defined inside enum xxx {...})
Re:New C features in GCC 13
by flohofwoe on Thursday May 04, 2023 @10:37AM
(#35816063)
...and most compilers also already silently treat compile time constant expressions like constexpr, an explicit constexpr just throws an error if the expression isn't actually a compile time constant.
(Enumeration constants are the identifiers defined inside enum xxx {...})