[LLVMbugs] [Bug 10725] New: error in libstdc++ header: dependent using declaration resolved to type without 'typename'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 23 14:17:40 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10725

           Summary: error in libstdc++ header: dependent using declaration
                    resolved to type without 'typename'
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: filcab at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


When trying to compile lldb on FreeBSD, I got this clang error. I created a
minimal test-case to show it. G++ compiles it cleanly. The debug constant must
be defined, for the error to occur.

It also occurs on Apple's Mac OS X Snow Leopard (at least).


filcab at aku ~/src> cat a.cpp
#include <map>

typedef std::map<int, long> collection;
typedef collection::iterator iterator;

filcab at aku ~/src> clang++ a.cpp -c -o a.o -D_GLIBCXX_DEBUG
In file included from a.cpp:1:
In file included from /usr/include/c++/4.2/map:69:
In file included from /usr/include/c++/4.2/debug/map:39:
/usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration
resolved to type without 'typename'
      using _Base::value_compare;
                   ^
a.cpp:4:9: note: in instantiation of template class 'std::__debug::map<int,
long, std::less<int>, std::allocator<std::pair<const
      int, long> > >' requested here
typedef collection::iterator iterator;
        ^
/usr/include/c++/4.2/bits/stl_map.h:111:13: note: target of using declaration
      class value_compare
            ^
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list