I'm using std::any
, which works well in cpp file, but error errors when used in header file. The C++ document doesn't state any
could be only used in cpp files.
Example code test.h
#include <iostream>
#include <map>
#include <any>
using namespace std;
typedef map<string, any> any_map; // error: use of undeclared identifier 'any'
Environment : Clang12, C++17
Thanks a lot.