vendredi 3 juillet 2015

A constexpr function is not required to return a constant expression?

C++ Primer (5th edition) on page 240 has a note stating:

"A constexpr function is not required to return a constant expression".

A question has been asked about this: can constexpr function return type be a non const?. The author of that question misunderstood the note.

But what is the correct understanding of it (the answers to the cited post clarify the confusion of that post's author, but do not answer my question)?

Aucun commentaire:

Enregistrer un commentaire