I like to use idea from Effective Modern C++ which uses non-implemented template; the type is output with compiler error:
template struct TD;
Now for auto variable var
, after its definition add:
TD td;
And watch error message for your compiler, it will contain type of var
.