Will consteval allow using static_assert on function arguments?
问题 Currently you cannot use static_assert to verify parameters of a constexpr function, even if all calls to it are indeed constexpr . That makes sense because the compiler still has to create a non-constexpr instantiation of this function in case some other module will try to call it. Sadly, this is the case even if the function is static or in an anonymous namespace. C++20 however, will introduce a new keyword consteval which is like constexpr but it doesn't allow calling a function in a non