This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: calling cast operator
- From: Andrà PÃnitz <andre dot poenitz at nokia dot com>
- To: gdb at sourceware dot org
- Date: Mon, 2 May 2011 18:09:49 +0200
- Subject: Re: calling cast operator
- References: <20110502155027.145630@gmx.net>
On Monday 02 May 2011 17:50:27 ext Klaus Rudolph wrote:
> Hi all,
>
> can I use a cast operator from an object on gdb?
>
> class B
> {
> ...
> };
>
> class A
> {
> operator B()
> };
>
> anyFunc()
> {
> A a;
>
> -> breakpoint
> }
>
> how can I get the value of the operation "a.operator B();" on the command line?
>
> print a.operator B()
"print a.'operator B'()" might work, and possibly "print (B)a", too.
Andre'