On 15 December 2010 10:46, zhang qingshan wrote: > > T--> void(), const T-->void() const T& -->void (&)(), > however, the linker complain that, > test.cpp:(.text+0x1c): undefined reference to `void fun<void()()>(void > ( const&)())' > > It seems that, gcc still resolve it as void (const &)(), not void(&)(). > > I do agree with you that, they are equivalent. But from the view of > the std rules, there shouldn't be a const here(it should be ignored > when it applies to the function). Yes, it would be clearer if the linker error didn't include the const, feel free to file a bug report requesting a diagnostic enhancement (but please don't refer to 8.3.2! :-)