Description
I'm new to c++. My project needs to use any library, which is a new feature after c++ 17. After updating my compiler following this link. I still encounter an error. Here is the error message and my test code.
g++ version:
g++ (Ubuntu 6.5.0-2ubuntu1~16.04) 6.5.0 20181026
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code
// test_c++17.cc
#include <any>
#include <iostream>
int main() {
std::cout << "hello c++ 17" << std::endl;
}
Compile
gcc -std=c++17 test_c++17.cc -o test