From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1705 invoked by alias); 9 Feb 2011 18:48:09 -0000 Received: (qmail 1697 invoked by uid 22791); 9 Feb 2011 18:48:08 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Feb 2011 18:48:04 +0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/47668] New: missing 'typename' in debug-mode map X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 09 Feb 2011 18:49:00 -0000 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: 2011-02/txt/msg01224.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47668 Summary: missing 'typename' in debug-mode map Product: gcc Version: 4.3.5 Status: UNCONFIRMED Severity: minor Priority: P3 Component: libstdc++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: redi@gcc.gnu.org include/debug/map.h refers to a type in a dependent base class, without using 'typename' using _Base::value_compare; I'm not sure if this is actually *wrong* - EDG accepts it too, as long as we don't try to use value_compare in that scope without adding 'typename' (and we don't do that.) However, clang++ rejects it, so debug mode maps cannot be used with clang: /opt/gcc/include/c++/4.4.3/debug/map.h:72:20: error: dependent using declaration resolved to type without 'typename' using _Base::value_compare; ^ adding 'typename' allows debug/map.h to be used with clang++, and doesn't seem to fall foul of PR 14258 (again, because we don't actually use the type in that scope) Another fix would be typedef typename _Base::value_compare value_compare; present in all active releases, not a regression same problem exists in include/debug/multimap.h