------- Comment #3 from public at alisdairm dot net  2010-04-30 13:15 -------
Subject: Re:  [C++0x] constexpr should allow declaration without a
         definition

I am aware constexpr is not fully supported, and checked with Jason before
filing this issue.

We believe that constexpr should currently support correct syntax checking, and
issues with syntax (not semantic) are valid for fixes in 4.5.

Clearly, there will be no support for using the result of a constexpr function
in constant expression, but it should act like a regular inline function, with
a few additional constraints.

This is actually impacting a project I am developing (home-brew STL
implementation) where I am currently placing constexpr where standard requires
it, but #defining it away until compilers support it.  GCC 4.5 fires off errors
in my code for detecting constexpr support, so I really don't want to #define
away a keyword if I can avoid it.

If the intent is that these parser issues will not be addressed in 4.5, then I
will revert my library to the old behaviour, but this would be a very useful
experiment if it could continue (looking at how code changes to live within
constexpr restrictions, that may affect how appropriate it is in practice for
all library uses if there is a runtime efficiency impact in
non-constant-expression usage)

On Apr 30, 2010, at 8:57 AM, paolo dot carlini at oracle dot com wrote:

> 
> 
> ------- Comment #2 from paolo dot carlini at oracle dot com  2010-04-30 12:57 
> -------
> Really, constexpr are *not* available yet, it seems definitely too early to
> file PRs (in retrospect, I think we should not have committed those parser
> bits, are causing a lot of counfusion :(
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43947
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43947

Reply via email to