public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "Gaetano.Checinski at googlemail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58910] New: std::Tuple_impl is non constexpr when using identical userdefined structs as type Date: Tue, 29 Oct 2013 11:57:00 -0000 [thread overview] Message-ID: <bug-58910-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58910 Bug ID: 58910 Summary: std::Tuple_impl is non constexpr when using identical userdefined structs as type Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Gaetano.Checinski at googlemail dot com Following code does not compile with gcc-snapshot(2013-10-21) : #include <tuple> using namespace std; struct t1{ constexpr t1(){} }; struct t2{ constexpr t2(){} }; int main() { constexpr t1 T1; constexpr t2 T2; constexpr tuple<t1,t2> Tup1(T1,T2); constexpr tuple<t1,t1> Tup2(T1,T1); constexpr auto a=get<0>(Tup1 ); //works fine constexpr auto b=get<0>(Tup2 ); // error: //'(const std::_Head_base<0ul, t1, true>*)(& Tup2)' //is not a constant expression constexpr auto b=get<0>(Tup2 ); return 0; }
next reply other threads:[~2013-10-29 11:57 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-29 11:57 Gaetano.Checinski at googlemail dot com [this message] 2013-10-29 13:25 ` [Bug c++/58910] [4.9 Regression] std::Tuple_impl is non constexpr when using identical userdefined structs as template-args paolo.carlini at oracle dot com 2013-10-29 14:26 ` [Bug c++/58910] " paolo.carlini at oracle dot com 2015-02-18 17:43 ` ville.voutilainen at gmail dot com
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-58910-4@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).