From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27361 invoked by alias); 8 Mar 2010 14:46:26 -0000 Received: (qmail 27334 invoked by uid 48); 8 Mar 2010 14:46:16 -0000 Date: Mon, 08 Mar 2010 14:46:00 -0000 Message-ID: <20100308144616.27333.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/6709] typeof() cannot be used with the :: operator In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "redi at gcc dot gnu 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: 2010-03/txt/msg00646.txt.bz2 ------- Comment #11 from redi at gcc dot gnu dot org 2010-03-08 14:46 ------- (In reply to comment #4) > Just noticed this bug myself. You can work around it by creating > a temporary typedef. E.g., > > typedef typeof(obj) T; > T::size_type s; > > Still annoying though. This workaround is required for decltype, I don't see why typeof should be any different. The reason is that decltype(obj) doesn't declare a new type-name, it is only a simple-type-specifier, which cannot appear in a nested-name-specifier. The typedef workaround introduces a new type-name, which is allowed in a nested-name-specifier. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709