Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEFINE_INPLACE_OPERATORS in vector.h return non-reference value #16

Closed
bcq028 opened this issue Mar 10, 2024 · 0 comments
Closed

DEFINE_INPLACE_OPERATORS in vector.h return non-reference value #16

bcq028 opened this issue Mar 10, 2024 · 0 comments

Comments

@bcq028
Copy link

bcq028 commented Mar 10, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant