Skip to content

Instantly share code, notes, and snippets.

Created December 29, 2013 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8171073 to your computer and use it in GitHub Desktop.
Save anonymous/8171073 to your computer and use it in GitHub Desktop.
C++11 doesn't work in Qt Creator 3.0.0 on Ubuntu 13.10 x64.
project(tuple_tests)
set(CMAKE_CXXFLAGS "-std=c++11")
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
/usr/include/c++/4.8/bits/c++0x_warning.h:32: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
^
/tmp/tuple_tests/main.cxx:-1: In function 'int main()':
/tmp/tuple_tests/main.cxx:5: error: 'foo' does not name a type
auto foo = std::make_tuple("bar", "foo", "can");
^
/tmp/tuple_tests/main.cxx:6: error: 'foo' was not declared in this scope
std::cout << foo;
^
#include <iostream>
#include <tuple>
int main() {
auto foo = std::make_tuple("bar", "foo", "can");
std::cout << foo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment