[LLVMbugs] [Bug 10087] New: Regression: Compile error with a map of strings

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 6 08:47:01 PDT 2011


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

           Summary: Regression: Compile error with a map of strings
           Product: libc++
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: jonathan.sauer at gmx.de
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6697)
 --> (http://llvm.org/bugs/attachment.cgi?id=6697)
Complete log file

Hello,

the following program does not compile with current clang and current libc++:

#include <string>
#include <map>

int main(int, char**)
{
    std::map<std::string, std::string>    ss;
}


Instead, the following error message is produced (complete log attached):

$ clang -std=c++0x -stdlib=libc++ clang.cppIn file included from clang.cpp:1:
/usr/include/c++/v1/string:1031:35: error: no type named 'char_type' in
      'std::__1::basic_string<char>'
    typedef typename traits_type::char_type              value_type;
            ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~


std::string alone works. It seems to be an interaction between it and std::map.

My clang version: $ clang --version
clang version 3.0 (trunk 132676)
Target: x86_64-apple-darwin10.7.0
Thread model: posix

My libc++ version: $ svn info .
[...]
Revision: 132677

-- 
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