Seeing from your G++ version, you need to update it badly. C++11 has only been available since G++ 4.3. The most recent version is 4.7.
In versions pre-G++ 4.7, you’ll have to use -std=c++0x
, for more recent versions you can use -std=c++11
.
More Related Contents:
- constexpr not working if the function is declared inside class scope
- std::enable_if to conditionally compile a member function
- Converting std::__cxx11::string to std::string
- Compiling C++11 with g++
- How does #include work in C++? [duplicate]
- Flattening iterator
- What are the correct link options to use std::thread in GCC under linux?
- Why is the destructor of a future returned from `std::async` blocking?
- What can and can’t I specialize in the std namespace?
- How std::bind works with member functions
- How to convert std::chrono::time_point to calendar datetime string with fractional seconds?
- std::bind overload resolution
- error: use of deleted function
- A class name introduced inside a class is not treated as a nested class name
- extra qualification error in C++
- C++ Add months to chrono::system_clock::time_point
- How can I use Standard Library (STL) classes in my dll interface or ABI?
- Why would I ever use push_back instead of emplace_back?
- Passing rvalues through std::bind
- How to compile C++ with C++11 support in Mac Terminal
- Linking files in g++
- std::remove_const with const references
- std::forward_list and std::forward_list::push_back
- “to_string” isn’t a member of “std”?
- std::this_thread::sleep_for() and GCC
- std::enable_if : parameter vs template parameter
- I want to kill a std::thread using its thread object? [duplicate]
- Assert that code does NOT compile
- Is substitution performed on a variadic parameter pack type if the pack is empty?
- map with incomplete value type