Using auto as a template parameter
问题 I'm attempting to compile the following using GCC 4.7.1 with the -std=c++11 flag set: std::map<std::string, auto> myMap; I'm attempting to create an object to contain a large amount of Json data of various types (int string, bool) as well as sub-structures (list, map) so I can't declare the type of the field value at compile time, so I thought I'd use the auto keyword for it. However, when I try to compile it, I get the following error: invalid use of ‘auto’ error: template argument 2 is