This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69139] [4.9/5/6 Regression] deduction failure with trailing return type in function template argument
- From: "rs2740 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 07 Feb 2016 23:59:28 +0000
- Subject: [Bug c++/69139] [4.9/5/6 Regression] deduction failure with trailing return type in function template argument
- Auto-submitted: auto-generated
- References: <bug-69139-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69139
--- Comment #3 from TC <rs2740 at gmail dot com> ---
Another test case, slightly modified from the original in the linked SO
question:
struct X {
auto get(int) const & -> int { return {}; }
auto get(int) && -> long { return {}; }
};
template <class R> auto f(auto (X::*)(int) const & -> R) -> R {}
using I = decltype(f(&X::get));
using I = int;
The fix needs to also handle the cv-qualifier-seq and ref-qualifier in the
function type, if any.