public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ensadc at mailnesia dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94490] Ternary expression with 3 consts is “not” a constant expression Date: Wed, 08 Apr 2020 13:43:03 +0000 [thread overview] Message-ID: <bug-94490-4-P1eyBlUsXt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94490-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94490 ensadc at mailnesia dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ensadc at mailnesia dot com --- Comment #2 from ensadc at mailnesia dot com --- reduced & modified: ``` template<class T> constexpr int fake_tuple_size_v = 3; template<int...> struct intseq {}; template<int N> using genseq = intseq<__integer_pack(N)...>; template<int A, class S = genseq<0 ? A : A>> struct arith_result { }; template<typename T> auto Mul(const T&) { return [](auto) { return arith_result<fake_tuple_size_v<T>> { }; }(0); } auto x = Mul(0); ```
next prev parent reply other threads:[~2020-04-08 13:43 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-05 2:18 [Bug c++/94490] New: " bisqwit at iki dot fi 2020-04-07 22:39 ` [Bug c++/94490] " mpolacek at gcc dot gnu.org 2020-04-08 13:43 ` ensadc at mailnesia dot com [this message] 2021-05-27 19:15 ` ppalka at gcc dot gnu.org 2021-05-27 21:03 ` mpolacek at gcc dot gnu.org 2021-12-01 17:23 ` mpolacek at gcc dot gnu.org 2021-12-02 13:21 ` cvs-commit at gcc dot gnu.org 2021-12-02 13:26 ` cvs-commit at gcc dot gnu.org 2021-12-02 13:28 ` mpolacek 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-94490-4-P1eyBlUsXt@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).