Is GCC 4.8.1 C++11 complete?

My understanding is that, other than regex support, G++'s C++11 support is largely complete with 4.8.1.

The following two links highlight the status of C++11 support in G++ 4.8.1 and libstdc++:

  • C++11 status in GCC 4.8.x.
  • C++11 status in libstdc++. Note that this is for the latest SVN release, not tied to a specific G++ release; therefore expect it to be "optimistic" with respect to G++.

To compile C++11 code, though, you need to include the command line flag -std=c++11 when you compile.


The g++ 4.8 series was not complete with regard to the core language. The following compiles and runs with g++ 4.9 and higher (and also with clang++ 3.3 and higher), but not with g++ 4.8.5 (or with any previous member of the g++ 4.8 series).

#include <iostream>

void ordinary_function (int&)  { std::cout << "ordinary_function(int&)\n"; }   

void ordinary_function (int&&) { std::cout << "ordinary_function(int&&)\n"; }   

template<class T>
void template_function (T&)  { std::cout << "template_function(T&)\n"; }   

template<class T>
void template_function (T&&) { std::cout << "template_function(T&&)\n"; }   

int main () {   
    int i = 42; 
    ordinary_function(42); // Not ambiguous.
    ordinary_function(i);  // Not ambiguous.
    template_function(42); // Not ambiguous.
    template_function(i);  // Ambiguous in g++4.8.
}