Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best compiler to use when you want to experiment with C++0x features?

What is the best compiler to experiment with C++0x features? I have been experimenting with GNU g++ 4.4.

like image 719
mempko Avatar asked Nov 10 '08 18:11

mempko


Video Answer


4 Answers

Definitely GCC Trunk. ConceptGCC misses many features GCC trunk has. It is being merged into GCC currently though. It has all these features, including the new auto-typed variables (no new function declaration syntax yet though): http://gcc.gnu.org/projects/cxx0x.html .

There is a GCC branch containing partial lambda support, which also contains other C++0x features. I would recommend you to try that one out too. It's in use on #geordi at irc.freenode.org, you can experiment with it there.

like image 71
Johannes Schaub - litb Avatar answered Oct 12 '22 06:10

Johannes Schaub - litb


Comeau - just for trying it online

like image 42
peterchen Avatar answered Oct 12 '22 06:10

peterchen


ConceptGCC (wiki) was made for that purpose, if I am not mistaken.

like image 31
mmocny Avatar answered Oct 12 '22 04:10

mmocny


It's probably not the best for C++0x experimentation, but for people who are MSVC oriented, there's a "Community Tech Preview" (CTP) of VS2010 which contains a preview of VC10 that has some parts of C++0x implemented (note that VC10 will not have the full set of C++0x changes implemented even when VC10 is released):

http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-BDA4-94CF5F8D4814&displaylang=en

Some details on what's new in the VC10 CTP:

  • Visual Studio 2010 CTP released
  • Lambdas, auto, and static_assert: C++0x Features in VC10, Part 1

As noted in the above article, "The Visual C++ compiler in the Microsoft Visual Studio 2010 September Community Technology Preview (CTP) contains support for four C++0x language features, namely:"

  • lambdas,
  • auto,
  • static_assert,
  • rvalue references
like image 27
Michael Burr Avatar answered Oct 12 '22 05:10

Michael Burr