Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does any compiler support constexpr yet?

Tags:

c++

c++11

I want to play with constexpr, does any compiler support it yet?

like image 480
fredoverflow Avatar asked Jun 16 '10 14:06

fredoverflow


2 Answers

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."

like image 127
James McNellis Avatar answered Oct 04 '22 06:10

James McNellis


As of July 2011, gcc 4.7 supports constexpr. You need to build it from svn though.

like image 39
Ricbit Avatar answered Oct 04 '22 05:10

Ricbit