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

constexpr function 'spz::times' cannot result in a constant expression #9

Open
TobyGilbert opened this issue Nov 18, 2024 · 3 comments

Comments

@TobyGilbert
Copy link

The 'times' overload constexpr Quat4f times(const Quat4f &a, const Quat4f &b) results in the following error on windows:

constexpr function 'spz::times' cannot result in a constant expression

This function appears to be unused, so removing it resolved this issue but this may be the reason why this error is not occurring on other platforms.

@Meakk
Copy link

Meakk commented Nov 18, 2024

I do have a warning on Linux. Another fix could be to change constexpr to inline.

@drewtu2
Copy link

drewtu2 commented Dec 6, 2024

This was an error for me on linux w/ gcc 9.4. Changing constexpr to inline made the error go away for me as well.

I believe the root cause of this is that Quat4f normalized(const Quat4f& v); is not a constexpr function.

@raymondyfei
Copy link

Met the same issue on Windows w/ VS2022. Changing the constexpr to inline would resolve the issue.

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

4 participants