#include <list>
#include <unordered_map>
using namespace std;
template<typename Type>
class A
{
list<Type> lst;
unordered_map<Type, list<Type>> m1; //OK
//unordered_map<Key, list<Type>::iterator> m2; //ERROR 如何改正???
unordered_map<Type, list<int>::iterator> m3; //OK
};
int main() {
return 0;
}
uj5u.com熱心網友回復:
list的模板引數是兩個,只不過平時你用具體型別時不用你寫,因為有默認。如果是模板引數,則要把第二個寫出來,就是那個alloc轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/283419.html
標籤:C++ 語言
下一篇:queue容器怎么用