mercredi 26 août 2015

What is the point of constexpr

Let's take a simple SFINAE templating example. In the second block of code the bool value has not been declared constexpr but it still gets its value on compile time. What then is the use of constexpr and why do simple static variables get their values at compile time? And how can I tell which values will get evaluated at compile time and which will not? Thanks

Aucun commentaire:

Enregistrer un commentaire