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

Build fails with GCC 14.1 #9

Closed
gaspacio opened this issue May 31, 2024 · 1 comment
Closed

Build fails with GCC 14.1 #9

gaspacio opened this issue May 31, 2024 · 1 comment
Assignees

Comments

@gaspacio
Copy link

gaspacio commented May 31, 2024

Bok dečki,
I've been using the library with GCC 13.2 but after updating to 14.1 this error appears:

/root/prj/x86_build/_deps/async-mqtt5-src/include/async_mqtt5/detail/control_packet.hpp: In member function 'void async_mqtt5::packet_id_allocator::free(uint16_t)':
/root/prj/x86_build/_deps/async-mqtt5-src/include/async_mqtt5/detail/control_packet.hpp:143:32: error: 'upper_bound' is not a member of 'std'; did you mean 'lower_bound'?

  143 |                 auto it = std::upper_bound(
      |                                ^~~~~~~~~~~
      |                                lower_bound

Adding #include <algorithm> (which defines std::upper_bound) in include/async_mqtt5/detail/control_packet.hpp fixed the build for me.

@ksimicevic ksimicevic self-assigned this Jun 3, 2024
ksimicevic added a commit that referenced this issue Jun 3, 2024
Summary:
related to T13767, #9

fix compilation error on g++-14
add g++-13 & g++-14 workflow to CI (requires ubuntu 24.04)

Reviewers: ivica

Reviewed By: ivica

Subscribers: miljen, iljazovic

Differential Revision: https://repo.mireo.local/D29794
@ksimicevic
Copy link
Collaborator

Hello!

Thank you for reporting this issue!
I pushed the commit to fix the compilation error you described.

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