[Bug c++/61400] suffix return type doesn't work for template member functions with explict specialization

yyc1992 at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 3 05:05:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61400

--- Comment #1 from Yichao Yu <yyc1992 at gmail dot com> ---
Additional info.

It seems that G++ only raise this error when all of the following are met:
1. Both of the functions (the one that uses suffix return type and the one used
in the argument of decltype) must be non-static template member functions.
2. The function used in decltype have to be explicitly specialized using at
least one of the template parameter from the other function. (i.e. there won't
be any error if I replace `decltype(a<i>())` with `decltype(a<0>())` or if the
template argument can be deduced from the function arguments) and the type of
the template argument doesn't seem to matter.



More information about the Gcc-bugs mailing list