While experimenting with classes and SAS6.51 I noticed that when
overriding the + operator and returning a temporary (on stack) instance of
the class that the entire class is copied then the temporary instance is
deleted. This seems to be a lot of overhead. Is there a syntax which
would allow the temporary instance to be used without being copied?
ex: declared as a friend of class zeta:
zeta operator + (zeta& A,zeta&B)
{
zeta temp;
temp.Add(A,B);
return temp;
}