http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54111
Bug #: 54111 Summary: function return type template deduction Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: leo...@volnitsky.com Created attachment 27882 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27882 4 source code files. Possible regression. There are 4 version of slightly different versions of below code (file bug-u2.cc): ----------------------------------------------------- #include <tuple> template<typename T, typename U> U operator* (T x, U& (*f)(T&) ) { return (*f)(x); }; int main() { std::tuple<int,int> tpl(42,43); return tpl * std::get<0,int,int>; } ---------------------------------------------------- These 4 versions are combination of 2 variants: - if template parameter U or hardcoded type int is used (codes int or u) - if get<0,int,int> or get<0> is used (codes 2 and 0) 4 version of above code are attached. For 3 versions of GCC that I have: 453 471 480-pre -------------------------------------- bug-int0.cc accp accp accp bug-int2.cc accp rej rej bug-u0.cc rej rej rej bug-u2.cc accp rej rej It seems that gcc463 behave the same as 453.