From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7111 invoked by alias); 11 Sep 2009 21:39:22 -0000 Received: (qmail 7074 invoked by uid 48); 11 Sep 2009 21:39:12 -0000 Date: Fri, 11 Sep 2009 21:39:00 -0000 Subject: [Bug c++/41341] New: gcc fails to reject inclass partial specialization of iherited class template X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tomek at jot23 dot org" 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: 2009-09/txt/msg01202.txt.bz2 In the attached code partial specialization of struct apply in struct METAFUNCTION2 should be rejected according to C++ Standard 14.7.3/3: A declaration of a function template or class template being explicitly specialized shall be in scope at the point of declaration of an explicit specialization. What's more troublesome is a fact that specialization in METAFUNCTION2 seems to affect the template in METAFUNCTION. The program produces: int double double while I would expect: int HELPER double -- Summary: gcc fails to reject inclass partial specialization of iherited class template Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tomek at jot23 dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41341