calling cast operator

André Pönitz andre.poenitz@nokia.com
Mon May 2 16:10:00 GMT 2011


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'



More information about the Gdb mailing list