Macros are implemented by the C++ preprocessor on the textual source code before it is submitted to the C++ compiler. `constexpr` are part of the language itself and are evaluated by the compiler at compile time.

Both can be used to define compile-time constants but in general `constexpr` should be preferred because it does not suffer from the problems of the C++ preprocessor such as accidental name conflicts with other variables in scope.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence