This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/12832] New: string types for operator overloading
- From: "jan.kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 1 Jun 2011 12:57:51 +0000
- Subject: [Bug exp/12832] New: string types for operator overloading
- Auto-submitted: auto-generated
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.