templated recursive data types
问题 I have a recursive data type like this: template<typename T> struct SomeType { std::map<T, SomeType<T>> mapping; }; SomeType<int> foo; This works fine, but replacing std::map with std::unordered_map results in a compile error due to an incomplete type. Am I (or gcc) making an error somewhere? or is this just part of the standard? I would also like to have the internal container determined by a template parameter (like std::stack and std::queue ), but I can't figure out a way to do it since