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: unassig...@gcc.gnu.org
        ReportedBy: r...@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

Reply via email to