From: Kenneth 'Bessarion' Boyd on
On Dec 5, 6:06 pm, "Kenneth 'Bessarion' Boyd" <zaim...(a)zaimoni.com>
wrote:

> Foo & operator = (const Foo &that)
> {
> if (this == &that)
> return *this;
>
> cout << "\nInside assignment operator ...\n" << endl;
> memset(this,&that,sizeof(Foo));
> return *this;
>
> }

s/memset/memcpy/ , of course.

However (considering what else has been mentioned) up-thread, I'm
unsurprised you're having to work around non-working optimization with
assembly language.


--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]