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

Support C++20 #6033

Closed
jameslamb opened this issue Aug 11, 2023 · 3 comments
Closed

Support C++20 #6033

jameslamb opened this issue Aug 11, 2023 · 3 comments

Comments

@jameslamb
Copy link
Collaborator

jameslamb commented Aug 11, 2023

Summary

As reported in #4803 (comment), and as I've observed working on #5981, LightGBM does not currently support C++20.

Attempting to compile fails with errors like the following.

[ 27%] Building CXX object source_subfolder/CMakeFiles/lightgbm.dir/src/io/config_auto.cpp.o
In file included from /home/algo/.conan/data/lightgbm/3.3.5///build/3402b31e727359cf1945dc386665e8a8c324a0f7/source_subfolder/src/io/bin.cpp:16:
/home/algo/.conan/data/lightgbm/3.3.5///build/3402b31e727359cf1945dc386665e8a8c324a0f7/source_subfolder/src/io/dense_bin.hpp:473:28: error: expected unqualified-id before ‘const’
473 | DenseBin<VAL_T, IS_4BIT>(const DenseBin<VAL_T, IS_4BIT>& other)

LightGBM should support C++20.

Motivation

Supporting a wider range of C++ standards reduces the risk of failures when updating vendored-in dependencies like fmt and fast_double_parser.

Description

See #5981 (will add more details later).

References

#5150
#5500

@kdarby-cqg
Copy link

Thanks @jameslamb as a workaround I was able to:

conan profile update settings.compiler.cppstd=${CPP_VERSION} ${PROFILE}
conan profile update settings.lightgbm:compiler.cppstd=11 ${PROFILE}

I'm sure the wider world would appreciate a lightgbm v4 conan package too, thanks!

@jameslamb
Copy link
Collaborator Author

the wider world would appreciate a lightgbm v4 conan package too

Whatever lightgbm conan package you're referring to isn't maintained in this project. See the discussion in #5770 (comment).

@StrikerRUS
Copy link
Collaborator

Closed in favor of being in #2302. We decided to keep all feature requests in one place.

Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature.

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

No branches or pull requests

3 participants