donut icon indicating copy to clipboard operation
donut copied to clipboard

DEFINE_INPLACE_OPERATORS in vector.h return non-reference value

Open bcq028 opened this issue 1 year ago • 0 comments

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?

bcq028 avatar Mar 10 '24 03:03 bcq028