This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

Re: g++ compiler generated copy constructor


On Mon, Aug 11, 2014 at 7:54 PM, navin p <navinp1281@gmail.com> wrote:
> Hi,
>   Is there any way i can see the compiler generated copy constructor
> and default constructor/destructor as a .cpp file instead of assembly
> ? Any flags to g++,

I don't think so, but I believe that even if you could do it both
constructor and destructor would be empty and copy constructor would
be something like this:

class C {
   Field a, b, c;
public:
   C(const C& rhs) : a(rhs.a), b(rhs.b), c(rhs.c) {}
};

Not much. Though my C++ is rusting, so I'm not completely sure.
-- 
JÄdrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.


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