From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16505 invoked by alias); 7 Jan 2013 08:04:01 -0000 Received: (qmail 16220 invoked by uid 55); 7 Jan 2013 08:03:40 -0000 From: "dodji at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52343] [C++11] alias-definition dont work in `template` params type Date: Mon, 07 Jan 2013 08:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dodji at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-01/txt/msg00441.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52343 --- Comment #5 from Dodji Seketeli 2013-01-07 08:03:39 UTC --- Author: dodji Date: Mon Jan 7 08:03:33 2013 New Revision: 194960 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194960 Log: PR c++/52343 - error with alias template as template template argument In the example accompanying this patch, check_instantiated_arg tries to ensure that a non-type template argument should be a constant if it has integral or enumeration type. The problem is that an alias template which type-id is, e.g, an integer, looks like an argument that has integral/enumeration type: its TREE_TYPE is an integer type. So check_instantiated_arg mistenkaly barks that this integral non-type argument is not a constant. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. gcc/cp/ PR c++/52343 * pt.c (check_instantiated_arg): Allow type template arguments. gcc/testsuite/ PR c++/52343 * g++.dg/cpp0x/alias-decl-29.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog