------- Comment #8 from jason at gcc dot gnu dot org 2007-10-04 08:49 ------- Less flippantly, I don't see the point in spending much effort on getting typeof to work properly inside templates when there's a standardized language feature you can use instead which is also better specified and flexible. As you can see in the comment threads for some of the other bug reports about typeof in templates, the semantics are not clear. Neither is the mangling; the ABI doesn't really provide for this sort of extension to type mangling. Just using the decltype mangling would be wrong, as the semantics can be different.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11756