This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/12213] New: operator() does not work
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 12 Nov 2010 18:27:53 +0000
- Subject: [Bug c++/12213] New: operator() does not work
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12213
Summary: operator() does not work
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@sourceware.org
ReportedBy: tromey@redhat.com
C++ operator() overloading does not work in gdb.
Try this program:
struct S {
int operator() (int x) { return x + 5; }
};
int main () {
S s;
return s(23);
}
When I try "print s(23)", I get:
(gdb) p s(23)
Invalid data type for function to be called.
--
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.