CLion doesn't seem to recognize c++ tuple
s, although I can build and run my program from the terminal.
When trying to build, I only get "Build failed", while all the members of tuple
are highlighted and I'm getting "Can't resolve namespace member tuple" (same with tie
and make_tuple
).
Here is my simple test:
#include<iostream>
#include<tuple>
std::tuple<int,int> testTuple();
int main(int argc, char** argv) {
int a, b;
std::tie(a,b) = testTuple();
std::cout<<a<<" "<<b;
return 0;
}
std::tuple<int,int> testTuple()
{
return std::make_tuple(0,1);
}
My CMakeLists.txt
:
cmake_minimum_required(VERSION 2.8)
project(testTuple)
SET(CMAKE_CXX_COMPILER, /usr/bin/g++-4.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_BUILD_TYPE Debug)
set(SOURCE_FILES "src/main.cpp")
add_executable(simplification ${SOURCE_FILES})