[macstl-dev] macstl wrapper
Simon P
psimonp at yahoo.com
Fri Jun 3 03:41:06 WST 2005
Ilya,
> template<class T>
> NumericArray2<T>
> operator*( const NumericArray2<T>& op1, const
> NumericArray2& op2 )
> {
> return NumericArray2<T>(
op1.get_data()*op2.get_data() );
> }
Yes, that's the actual code I am using.
Note that the above function is actually not a method
of the class.
> Also, operator* of NumericArray2 has to return thru
> constant reference as well.
I think this is where the problem is. It does an extra
copy, because I can't return through the const
reference.
Simon
__________________________________
Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out!
http://discover.yahoo.com/
More information about the macstl-dev
mailing list