What is wrong in this code?
#include
Exactly what the compiler error message says: in
TMap
, T
is not deduceable according to the
standard. The motivation for this is probably that it isn't
technically possible to implement: the compiler would have to
instantiate all possible TMap
in order to see if one (and
only one) matched the type you passed. And there is an
infinite number of TMap
.