Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is "-std=c++0x" still needed for g++ 4.6.2? [closed]

Tags:

c++

gcc

g++

I downloaded and built gcc 4.6.2. I find that for C++11 features, the command line option -std=c++0x is still needed. Why is that? Isn't is supposed to support it by default?

    $ g++ --version
    g++ (GCC) 4.6.2
    Copyright (C) 2011 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
like image 686
Nemo Avatar asked Dec 23 '11 14:12

Nemo


1 Answers

Because

  • C++11 is only 4 Months old and support for it is far from being complete or tested
  • changing the default without a big announcement and preparation phase for people is not nice
  • It is not clear if the default will ever change (see -std=C99).
like image 157
PlasmaHH Avatar answered Oct 05 '22 07:10

PlasmaHH