Created
December 29, 2013 14:44
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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; | |
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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