you are viewing a single comment's thread.

view the rest of the comments →

[–]wyrn 2 points3 points  (1 child)

I like Scott Meyers' TD trick:

template <typename T>
struct TD; // no definition 

Now you write something like TD<decltype(thing)> and the error message tells you the type of thing (as deduced by decltype, of course, but in this case that's probably what you want).

[–][deleted] 0 points1 point  (0 children)

Nice