Preliminary support constexpr

Joseph S. Myers joseph@codesourcery.com
Thu Oct 1 12:38:00 GMT 2009


On Thu, 1 Oct 2009, Gabriel Dos Reis wrote:

> Jason reviewed and approved this patch late in the evening.
> This is a preliminary support for constexpr.  Compile-time evaluation
> of function calls is not supported in this patch; that is the subject of
> the follow up patch.
> 
> Bootstrapped on an x86_64-suse-linux.
> Applied to trunk.

Even preliminary patches need testcases before going on trunk, and I don't 
see any in this patch.  If some of the tests are XFAILed because they test 
features you haven't yet implemented (if you wrote tests for the full 
feature up front but haven't yet implemented all of it), that's fine - but 
the tests should be there.

> +           /* It is not permitted to define a member function outside ist
> +              membership class as `constexpr'.  */
> +           if (constexpr_p)
> +             error ("a constexpr function cannot be defined "
> +                    "outside of its class.");

Diagnostics should not end with ".".

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list