Reputation: 430
Considering a program is comprised entirely of constexpr functions (which are all capable of being computed at compile-time), is there a limit to how "levels" deep can constexpr functions be called? Could a whole program be computed at compile-time, given the right requisites, by using only constexpr functions?
Upvotes: 1
Views: 88
Reputation: 119174
The standard recommends in Annex B a limit that is at least 512, but a conforming implementation need not comply with the recommendation.
— Recursive
constexpr
function invocations [512].
Upvotes: 6