Relative Content

Tag Archive for enumsc++20deprecation-warningcompile-time-constantcross-language

C++20 deprecation of inter-enum-type arithmetic vs anonymous-enum compile-time constants

Anonymous enums are in common use for defining compile-time-only constants in a compiler-supported fashion (i.e. without resorting to Macros), in C. This is also true for C++ (because even while the use of constexpr is somewhat of an alternative, one can still take the address of a constexpr constant and force it to actually have one at run time).