https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95769
--- Comment #2 from John Simon <gcc at mailinator dot com> --- (In reply to Jakub Jelinek from comment #1) > If you want to ensure a function is evaluated at compile time, it needs to > be either C++20 consteval, or you need to evaluate it in constant expression > context, e.g. constexpr auto x = expensive_function(10000); in this case, doing that will make the `other_function` consteval too, so I can't call it with non-constant values.