What is wrong in this code?
#include
I don't think "we can't do this" argument is correct. If we slightly modify this example, the compiler is happily deducing arguments for us.
template
struct TMap //...
template
struct tmap_t : TMap::Type {};
template
T test(tmap_t tmap) // ...
tmap_t tmap; // ...
double d = test(tmap); // compiles just fine.
I don't see a huge difference between the original example and mine. The real issue here seems that C++ treats typedefs and type declarations differently
Is this a good thing?