I was looking for a way to have a string[]
as a map value, and I found this Stack Overflow question. I attempted to use the std::any
type to solve my problem, and I got the error
binary '<': 'const _Ty' does not define this operator or a conversion to a type acceptable to the predefined operator
Here is my code:
#include <iostream>
#include <map>
#include <any>
using namespace std;
map<any,any> dat;
int main()
{
any s[] = {"a","b"};
dat["text"] = s;
return 0;
}