I want to play with constexpr
, does any compiler support it yet?
views:
149answers:
1
+7
A:
The Apache Stdcxx project has a nice table detailing which C++0x features are supported by which compilers. It's been updated on a regular basis and covers most of the modern C++ compilers.
According to that, only GCC 4.5 supports constexpr
(note that that support may be experimental).
Between that list and what has been said in the comments, it appears the answer is "no."
James McNellis
2010-06-16 14:28:18
The [official GCC support table](http://gcc.gnu.org/projects/cxx0x.html) states that `constexpr` is not supported at all. My code does compile with `constexpr`, but it seems to have no effect whatsoever. My first guess is that the keyword is simply ignored?
FredOverflow
2010-06-16 14:58:45
@Fred: Maybe no one supports it then. I don't use gcc frequently enough to know much about its C++0x support, sadly.
James McNellis
2010-06-16 15:27:04
Just tested on g++ (GCC) 4.6.0 20100605 -- still can't create an array of size returned by a constexpr function. Reading bugzilla, it appears GCC 4.5 introduced syntax, but not (yet) semantics.
Cubbi
2010-06-16 15:43:36