This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/69139] [4.9/5/6 Regression] deduction failure with trailing return type in function template argument


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]