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

Some of the functions declared constexpr are not cross-compilable #18

Open
nyoungbq opened this issue May 23, 2023 · 1 comment
Open

Comments

@nyoungbq
Copy link

nyoungbq commented May 23, 2023

I don't know if this is directly pertinent to you, depending on what platforms you want to support. If it's not feel free to close the issue.

There are a multitude of places throughout the code base that use the identifier constexpr, but make calls to std::pow, std::log, and std::sqrt in the definitions. These are not actually defined as constexpr in the c++ standard (see this stackoverflow post) and as such any standard compiler other than GCC will throw errors when trying to compile the library.

I have made a workaround for this on my personal fork of this repository using a few header only files from the kthohr/gcem library. I don't know if you want to bring in external libraries but it is at least worth looking at if you need a launch point. Likewise, you are welcome to review my fork for reference. If you want I will be happy to open a pull request from that fork here, but there are significant modifications to the structuring and include paths on mine (It's currently a work in progress).

@astralord
Copy link
Owner

First of all, I want to say that I greatly appreciate your comments and the fact that you found my work useful. I've checked out your forks and it looks like your team applied a lot of changes to the original library. It's difficult for me to say right now which ones are good for general use. In this case, I will rely on your opinion as it seems to me that you are more experienced C ++ developer than I am 😁

I didn't plan to add any external dependencies, but few header only files is a small price to pay for cross-compilability. I'll be happy to review your pull request once your work is done.

@astralord astralord reopened this Jun 20, 2023
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

2 participants