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 c++/12213] New: operator() does not work


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.


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