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

Unable to build with C++17 compiler #489

Closed
simon816 opened this issue Jun 26, 2024 · 1 comment
Closed

Unable to build with C++17 compiler #489

simon816 opened this issue Jun 26, 2024 · 1 comment
Labels
Milestone

Comments

@simon816
Copy link

Versions 3.50.0 onwards are not possible to build with a C++17 only compiler due to the use of a C++20 feature.

This commit: 6b1fd9c used #include <span> which is only available since C++20 (https://en.cppreference.com/w/cpp/header/span)

I get the following error:

In file included from /data/packages/lms-3.50.0/src/libs/utils/include/utils/ILogger.hpp:25,
                 from /data/packages/lms-3.50.0/src/libs/utils/impl/Config.cpp:23:
/data/packages/lms-3.50.0/src/libs/utils/include/utils/String.hpp:24:10: fatal error: span: No such file or directory
   24 | #include <span>
      |          ^~~~~~
compilation terminated.

This is on Ubuntu 20.04, g++ 9.3.0

INSTALL.md says C++17 is the minimum required version: https://github.com/epoupon/lms/blob/master/INSTALL.md?plain=1#L36

Either the documentation should be updated or the code should be made backwards compatible

@epoupon
Copy link
Owner

epoupon commented Jun 27, 2024

Thanks for reporting.
The documentation should be updated, C++20 is needed, and span is not the only C++20 feature used.

epoupon added a commit that referenced this issue Jun 27, 2024
@epoupon epoupon added this to the v3.55.0 milestone Jun 27, 2024
@epoupon epoupon added the bug label Jun 27, 2024
@epoupon epoupon closed this as completed Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants