[Bug c++/64969] generic functions do not work with placeholder return types

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 13 12:04:00 GMT 2015


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-13
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Complete example:

auto f1(auto x) { return x++; }
decltype(auto) f2(auto x) { return x++; }
auto f3(auto x) -> int { return x++; }

struct X {
  int operator++(int) const { return 0; }
};

X x;
auto r1 = f1(x);
auto r2 = f2(x);
auto r3 = f3(x);



More information about the Gcc-bugs mailing list