From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10779 invoked by alias); 21 Jul 2010 02:54:12 -0000 Received: (qmail 10668 invoked by alias); 21 Jul 2010 02:53:58 -0000 Date: Wed, 21 Jul 2010 02:54:00 -0000 Message-ID: <20100721025358.10667.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/45012] Invalid ambiguity on partial class specialization matching In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg02162.txt.bz2 ------- Comment #2 from pinskia at gmail dot com 2010-07-21 02:53 ------- Subject: Re: New: Invalid ambiguity on partial class specialization matching On Jul 20, 2010, at 7:43 PM, "rodolfo at rodsoft dot org" wrote: > The following code doesn't compile unless variable RUNTIME is > defined as a > "static const int" instead of an "enum": > This enum value has an anonymous type which is not valid in the context of templates in C++03/98. It is valid in the current draft of C ++0x though. But I cannot remember if 4.5 implements that rule for - std=gnu++0x (-std=c++0x). > #include > > enum { RUNTIME = 0 }; > // it compiles with the previous line commented out and the next > commented in > // static const int RUNTIME=0; > > template struct foo; > > template class V, int M> > struct foo,V, typename std::enable_if M==2>::type> {}; > > template class V1, template class V2, int M> > struct foo,V2, typename std::enable_if M==2>::type> {}; > > template struct bar {}; > > foo,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 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45012