[cfe-dev] C++11: new builtin to allow constexpr to be applied to performance-critical functions

Gabriel Dos Reis gdr at integrable-solutions.net
Sat Oct 20 19:36:41 PDT 2012


On Sat, Oct 20, 2012 at 2:24 PM, Jordan Rose <jordan_rose at apple.com> wrote:

> While throwing things out there, why not just optionally allow constexpr functions to coexist with non-constexpr functions of the same name, like inline and non-inline?

Or remove most of the restrictions on constexpr functions that were necessary
only to win approval for C++11.  This case doesn't strike me as one of
those where you fight complexity with even greater complexity.

Allow loops and the like in constexpr functions and be done with it.  See my
comments on the C++ Extension Working Group when these (and related)
issues where brought up.

-- Gaby



More information about the cfe-dev mailing list