If I am allowed to do the following:
template <typename T = int>
class Foo{
};
Why am I not allowed to do the following in main?
Foo me;
But I must specify the following:
Foo<int> me;
C++11 introduced default template arguments and right now they are being elusive to my complete understanding.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…