public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64335] New: decltype and access of a private member type
@ 2014-12-17 2:17 ville.voutilainen at gmail dot com
2014-12-17 2:20 ` [Bug c++/64335] " ville.voutilainen at gmail dot com
2020-07-15 10:01 ` redi at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-17 2:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64335
Bug ID: 64335
Summary: decltype and access of a private member type
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
This compiles fine:
#include <chrono>
class foo { std::chrono::high_resolution_clock clock;};
static_assert(!decltype(foo::clock)::is_steady, "xxx");
This doesn't:
class foo {
class bar {typedef int foo;};
};
int main()
{
decltype (foo::bar) y;
}
Clang rejects both.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/64335] decltype and access of a private member type
2014-12-17 2:17 [Bug c++/64335] New: decltype and access of a private member type ville.voutilainen at gmail dot com
@ 2014-12-17 2:20 ` ville.voutilainen at gmail dot com
2020-07-15 10:01 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ville.voutilainen at gmail dot com @ 2014-12-17 2:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64335
--- Comment #1 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Pardon that, the latter example contains remnants of other experiments. Here's
a simplified version, (not that it really should matter :) )
class foo {
class bar {};
};
int main()
{
decltype (foo::bar) y;
}
This is rejected properly.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/64335] decltype and access of a private member type
2014-12-17 2:17 [Bug c++/64335] New: decltype and access of a private member type ville.voutilainen at gmail dot com
2014-12-17 2:20 ` [Bug c++/64335] " ville.voutilainen at gmail dot com
@ 2020-07-15 10:01 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2020-07-15 10:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64335
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |6.0
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This was fixed for GCC 6 by:
Fix decltype-call1.C with -std=c++1z.
* parser.h (struct cp_token): Tell GTY that CPP_DECLTYPE uses
tree_check_value.
* parser.c (cp_parser_decltype): Use tree_check_value.
(saved_checks_value): New.
(cp_parser_nested_name_specifier_opt): Use it.
(cp_parser_template_id): Use it.
(cp_parser_simple_type_specifier): Use it.
(cp_parser_pre_parsed_nested_name_specifier): Use it.
From-SVN: r231353
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-15 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 2:17 [Bug c++/64335] New: decltype and access of a private member type ville.voutilainen at gmail dot com
2014-12-17 2:20 ` [Bug c++/64335] " ville.voutilainen at gmail dot com
2020-07-15 10:01 ` redi 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).