public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/47668] New: missing 'typename' in debug-mode map
@ 2011-02-09 18:49 redi at gcc dot gnu.org
  2011-02-09 19:23 ` [Bug libstdc++/47668] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2011-02-09 18:49 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-03-15 16:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 18:49 [Bug libstdc++/47668] New: missing 'typename' in debug-mode map redi at gcc dot gnu.org
2011-02-09 19:23 ` [Bug libstdc++/47668] " redi at gcc dot gnu.org
2011-02-09 20:37 ` paolo.carlini at oracle dot com
2011-02-09 20:53 ` redi at gcc dot gnu.org
2011-02-09 20:55 ` redi at gcc dot gnu.org
2011-02-09 21:00 ` paolo.carlini at oracle dot com
2011-02-10  0:11 ` paolo at gcc dot gnu.org
2011-02-10  0:22 ` paolo.carlini at oracle dot com
2011-03-15 16:19 ` ramana at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).