This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug exp/12832] New: string types for operator overloading


http://sourceware.org/bugzilla/show_bug.cgi?id=12832

           Summary: string types for operator overloading
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: exp
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com
              Host: x86_64-unknown-linux-gnu
            Target: x86_64-unknown-linux-gnu


#include <unordered_map>
#include <string>
int main(){
std::unordered_map<std::string, std::string> foo;
std::string x = "foo";
foo[x] = "a";
foo["bar"] = "b";
return 0;
}
g++ -std=c++0x -o unordered_map unordered_map.C -Wall -g

GNU gdb (GDB) 7.3.50.20110601-cvs
8       return 0;
(gdb) p foo[x]
$1 = "a"
(gdb) p foo["bar"]
Cannot resolve function operator[] to any overloaded instance

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]