This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [cfe-dev] C++11: new builtin to allow constexpr to be applied to performance-critical functions
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Jordan Rose <jordan_rose at apple dot com>
- Cc: Andy Gibbs <andyg1001 at hotmail dot co dot uk>, Richard Smith <richard at metafoo dot co dot uk>, Chandler Carruth <chandlerc at google dot com>, gcc at gcc dot gnu dot org, cfe-dev at cs dot uiuc dot edu
- Date: Sat, 20 Oct 2012 21:36:41 -0500
- Subject: Re: [cfe-dev] C++11: new builtin to allow constexpr to be applied to performance-critical functions
- References: <CAOfiQqmO1Hmfddqb+OMkANTofN0XVtLLCj=V-qAvQCzzpb+YVw@mail.gmail.com> <CAGCO0Kh0_+jMsLAW6nyhgQ1Jc2Cr0-cwrUg8KKH2dRXYo2E_qw@mail.gmail.com> <BAY170-DS44B8B99AC6DA99A463AE8BE7740@phx.gbl> <14E26BDD-911B-4793-B065-F1C65CD3E991@apple.com>
On Sat, Oct 20, 2012 at 2:24 PM, Jordan Rose <jordan_rose@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