https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103403
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.3
Ever confirmed|0 |1
Known to fail| |11.1.0
Summary|Decltype of rvalue |[11/12 Regression] auto
|reference |return type with a trailing
| |return type of decl(auto)
| |uses rvalue reference type
| |instead of reference type
Status|UNCONFIRMED |NEW
Known to work| |10.1.0, 10.3.0, 7.1.0
Last reconfirmed| |2021-11-24
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a C++14 testcase which shows this is also a regression:
template<typename T>
auto constexpr RtoL1(T&& r) -> decltype(auto) {
return (r);
};
int main() {
int t;
int x{3};
decltype (RtoL1(x+0)) y = t;
}
Confirmed.