donut
donut copied to clipboard
DEFINE_INPLACE_OPERATORS in vector.h return non-reference value
in matrix.h, return matrix<T,rows,cols> &, however in vector.h
template<typename T> vector<T, 3> operator op (vector<T, 3>& a, const vector<T, 3>& b) \
{ a.x op b.x; a.y op b.y; a.z op b.z; return a; } \
return a will return a copyed value, is it a mistake?