public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rodolfo at rodsoft dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/45012] New: Invalid ambiguity on partial class specialization matching Date: Wed, 21 Jul 2010 02:43:00 -0000 [thread overview] Message-ID: <bug-45012-6196@http.gcc.gnu.org/bugzilla/> (raw) The following code doesn't compile unless variable RUNTIME is defined as a "static const int" instead of an "enum": #include <type_traits> enum { RUNTIME = 0 }; // it compiles with the previous line commented out and the next commented in // static const int RUNTIME=0; template <class T, class U, class EN=void> struct foo; template <template<int> class V, int M> struct foo<V<M>,V<M>, typename std::enable_if<M==RUNTIME || M==2>::type> {}; template <template<int> class V1, template<int> class V2, int M> struct foo<V1<M>,V2<M>, typename std::enable_if<M==RUNTIME || M==2>::type> {}; template <int M> struct bar {}; foo<bar<2>,bar<2>> x; -- Summary: Invalid ambiguity on partial class specialization matching Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rodolfo at rodsoft dot org GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45012
next reply other threads:[~2010-07-21 2:43 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-07-21 2:43 rodolfo at rodsoft dot org [this message] 2010-07-21 2:49 ` [Bug c++/45012] " rodolfo at rodsoft dot org 2010-07-21 2:53 ` [Bug c++/45012] New: " Andrew Pinski 2010-07-21 2:54 ` [Bug c++/45012] " pinskia at gmail dot com 2010-07-21 3:03 ` rodolfo at rodsoft dot 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-45012-6196@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).