-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Remove template parameters from copy constructor #6514
Conversation
@microsoft-github-policy-service agree |
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.
Thanks for this! I've edited the description to link to #6033.
With this change, were you able to compile LightGBM using the C++20 (or even better, C++23 standard)? Or is this just one step towards that?
Either way, we appreciate the help!
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.
Makes sense to me, based on my read of e.g. https://stackoverflow.com/a/63514123/3986677 and the bits of the C++20 standard linked from it.
Thanks for the help!
Can confirm I can compile with C++23, gcc-12. However, it requires me to remove the __mm_malloc macros - #4331 (but this seem be a GCC thing) |
Ok interesting, thank you for that! I don't recall the history for these LightGBM/include/LightGBM/utils/common.h Lines 41 to 55 in 3d386be
Maybe @StrikerRUS or @guolinke will remember why they were added in #2699. |
sometimes we need the memory allocation with aligned address, like LightGBM/include/LightGBM/cuda/vector_cudahost.h Lines 41 to 60 in 4842832
|
Ah got it, thank you! Ok I'll investigate this further. Maybe some headers have changed in newer versions of compilers. |
Contributes to #6033
Contributes to #6522
C++23 no longer allow template parameters in constructor