public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67633] New: decltype on parenthesized class member access of a prvalue sometimes return wrong results
@ 2015-09-18 22:49 rs2740 at gmail dot com
2021-08-27 0:38 ` [Bug c++/67633] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: rs2740 at gmail dot com @ 2015-09-18 22:49 UTC (permalink / raw)
To: gcc-bugs
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));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-27 0:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18 22:49 [Bug c++/67633] New: decltype on parenthesized class member access of a prvalue sometimes return wrong results rs2740 at gmail dot com
2021-08-27 0:38 ` [Bug c++/67633] " pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).