------- Comment #3 from dev at sogetthis dot com 2010-08-19 15:27 ------- I just found out that it does compile successfully with -std=c++0x flag.
In C++03, unnamed type shall not be used as a template-argument for a template type-parameter (irrespective of it's linkage). In C++0x this restriction has been removed. See 14.3.1 Template type arguments -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45341