C++17 constexpr if replaces most cases where macros would have to be used.
It also simplifies generic functions and metaprogramming and works with C++20 concepts to allow code to adjust based on features supported by the type of the function arguments.
Compiler Explorer link: https://compiler-explorer.com/z/vT99WMoTr