This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g++ compiler generated copy constructor
- From: JÄdrzej Dudkiewicz <jedrzej dot dudkiewicz at gmail dot com>
- To: navin p <navinp1281 at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 11 Aug 2014 20:18:14 +0200
- Subject: Re: g++ compiler generated copy constructor
- Authentication-results: sourceware.org; auth=none
- References: <CAKVd3pWt2XddzPmK749SxeE4zEt0f-U5m13yNfyUG7+Nbd4phQ at mail dot gmail dot com>
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.