When to use constinit and consteval?

1.3k Views Asked by At

The usage of constexpr is quite straightforward which is to make sure the code can be evaluated at the compile time itself.

But the latest features of C++ 20 which provides constinit and consteval are little bit confusing. Can someone provide the practical use case of constinit and consteval?

0

There are 0 best solutions below