Build fails with GCC 14.1
Closed this issue · 1 comments
gaspacio commented
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 commented
Hello!
Thank you for reporting this issue!
I pushed the commit to fix the compilation error you described.