Address of temporary objects
From: Ariel (ariele_at_elbit.co.il)
Date: 10/31/04
- Next message: Steven T. Hatton: "Re: Best IDE platform: Eclipse?"
- Previous message: Cedric LEMAIRE: "Re: C++ to C++ transformer"
- Next in thread: Phlip: "Re: Address of temporary objects"
- Reply: Phlip: "Re: Address of temporary objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Oct 2004 02:28:05 -0800
When passing an object by value to some function foo(), the copy
constructor gets called and inside it i see that the address of the
temporary obect is X.
but when entering to foo() i see that the address of the temporary
object is Y.
By looking at the assembly i think that the copiler copies the
temporary object to a different location after calling the copy
constructor.
Is it legal?
thanks ahead,
Ariel Erenberg
- Next message: Steven T. Hatton: "Re: Best IDE platform: Eclipse?"
- Previous message: Cedric LEMAIRE: "Re: C++ to C++ transformer"
- Next in thread: Phlip: "Re: Address of temporary objects"
- Reply: Phlip: "Re: Address of temporary objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|