public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99650] ICE when trying to form reference to void in structured binding Date: Thu, 18 Mar 2021 18:22:24 +0000 [thread overview] Message-ID: <bug-99650-4-iHz8A5vdws@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99650-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99650 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- cvise reduced into: template <int a> struct b { static constexpr int value = a; }; template <typename c> c e(long); template <typename c> auto d() -> decltype(e<c>(0)); template <typename> struct tuple_size; template <unsigned long, typename> struct tuple_element; template <typename...> struct l { template <int> void get(); }; l<int, int, int, void> f; template <typename... g> struct tuple_size<l<g...>> : b<sizeof... (g)> {}; template <unsigned long m, class... g> struct tuple_element<m, l<g...>> { using type = decltype(d<l<>>().get<m>()); }; auto [h, i, j, k] = f; Another testcase that ICEs the same way: namespace std { template<typename T> struct tuple_size; template<int, typename> struct tuple_element; } struct A { int i; template <int I> void get() { } }; template<> struct std::tuple_size<A> { static const int value = 2; }; template<int I> struct std::tuple_element<I,A> { using type = void; }; A a = { 42 }; auto [ x, y ] = a;
next prev parent reply other threads:[~2021-03-18 18:22 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-18 17:47 [Bug c++/99650] New: " csaba_22 at yahoo dot co.uk 2021-03-18 18:22 ` jakub at gcc dot gnu.org [this message] 2021-03-18 18:31 ` [Bug c++/99650] " mpolacek at gcc dot gnu.org 2021-03-18 19:08 ` jakub at gcc dot gnu.org 2021-03-18 20:51 ` csaba_22 at yahoo dot co.uk 2021-03-23 9:24 ` cvs-commit at gcc dot gnu.org 2021-03-30 22:41 ` cvs-commit at gcc dot gnu.org 2021-04-20 23:33 ` cvs-commit at gcc dot gnu.org 2021-04-22 16:52 ` cvs-commit at gcc dot gnu.org 2021-04-22 17:11 ` jakub at gcc dot gnu.org 2021-09-11 14:23 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-99650-4-iHz8A5vdws@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).