[Bug c++/67633] New: decltype on parenthesized class member access of a prvalue sometimes return wrong results
rs2740 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 18 22:49:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67633
Bug ID: 67633
Summary: decltype on parenthesized class member access of a
prvalue sometimes return wrong results
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
Target Milestone: ---
Per the resolution of CWG 616, given struct A { double x; };, decltype((A().x))
should be double&&.
However, the following snippet (incorrectly) compiles:
struct A { double x; };
using t1 = double;
using t1 = decltype((A().x));
Note that the following snippet (correctly) does not compile:
struct A { double x; };
struct B : A {};
using t1 = double;
using t1 = decltype((B().x));
More information about the Gcc-bugs
mailing list