Macro constants are bad usually
i just want a simple constant for switch case here, no complex type dangerous situation or anything else. what if i don't want allocate memory for it?
I believe if you don't get address of constexpr variable the compiler can optimize it out anyway
because macros are not exactly a "part of the language", constexpr is. C++ in recent years has tried to get more and more macro things baked into the language.
Обсуждают сегодня