From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4181 invoked by alias); 20 Oct 2008 11:13:30 -0000 Received: (qmail 2546 invoked by uid 48); 20 Oct 2008 11:12:06 -0000 Date: Mon, 20 Oct 2008 11:13:00 -0000 Subject: [Bug c++/37875] New: [c++0x] misinterpreted closing angle bracket in decltype operand X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gcc-bugzilla at contacts dot eelis dot net" 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: 2008-10/txt/msg01281.txt.bz2 I think g++ incorrectly rejects the following code when compiled with -std=c++0x: template struct X {}; X 2)> x; // t.cpp:2: error: template argument 1 is invalid // t.cpp:2: error: invalid type in declaration before ‘;’ token For comparison, here is very similar code that is accepted: template struct Y {}; Y 2)> y; Hence, I suspect it is a problem with decltype. -- Summary: [c++0x] misinterpreted closing angle bracket in decltype operand Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc-bugzilla at contacts dot eelis dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37875