VisualStudio can not compile this code (error C2976)
but GCC and Clang can compile this code
why???
#include <iostream>
#include <map>
template <typename... ARGS>
void Func(const std::map<ARGS...>& m)
{
//...
}
template <typename T>
void Func(const T& t)
{
//...
}
int main()
{
std::map<int, double> m;
Func(m); // error C2976: 'std::map': too few template arguments
Func(123); // OK
return 0;
}
Aucun commentaire:
Enregistrer un commentaire