kdevplatform krazy
Roberto Raggi
roberto at kdevelop.org
Thu Jul 19 13:13:18 UTC 2007
Hi!
Il giorno 19/lug/07, alle ore 14:41, Kris Wong ha scritto:
> True, but that sort of thing is generally considered bad practice
> and I
> believe is undefined according to the c++ standard. You are right,
trust me the evaluation of the assignment operator is very well
defined in the standard.
> though, it is generally common practice to return a reference to the
> item.
you should emulate the assignment operator for primitive types (like
char, int,..) by returing a reference. You can use void if you don't
care about the return type (for instance when you want to disable the
assignment operator).
ciao tobe
More information about the KDevelop-devel
mailing list