From: Kenneth 'Bessarion' Boyd on 6 Dec 2009 03:12 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! ]
|
Pages: 1 Prev: C++0x: Lambda, decltype, member function etc... Next: C++, C99 and floating point exceptions |