-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix compilation errors and warnings on clang++ version 20 #3928
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
Conversation
|
I will release a bugfix version of mlpack after this, so that I can upload the fixed version to CRAN. |
Well put. |
|
I broke something strange here... I'll convert to a draft until I get it fixed... |
|
Ok, I managed to figure out the subtle issue here on Apple clang and this is now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second approval provided automatically after 24 hours. 👍
I am grudgingly thankful to CRAN for catching these errors: https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/mlpack-00install.html
The actual error is:
It appears that clang does not like the series of partial template specializations that we use for different
TreeTraits. I worked around this issue by, for each individual tree type, making only one specialization ofTreeTraits, and using other traits classes internally (likeIsRPTreeSplitType<>and a few others I added) to set the boolean values inTreeTraitsappropriately, depending on the configuration of the tree.There is no actual behavior change, this is just a refactoring that makes compilation work on newer clang versions.
I also fixed a few unused variable warnings and other warnings that clang emitted.