Missing #include <algorithm>
Closed this issue · 5 comments
Hi hope you are well.
For some reason it seems that #include <algorithm>
is missing in multiple files which results in errors like no matching function for call to 'find'
or ‘transform’ has not been declared in ‘std’
when making the application.
I'm not sure what is the right solution for this but I just went through these files and add #include <algorithm>
at the top.
Is there something that I'm missing?
By the way I'm using GNU Make 4.3
gcc version 11.2.0
on Ubuntu 20.04
It's probably just that older compilers include it as a side effect of including some other header so nobody noticed until now.
GCC 11 has a few header dependency changes: https://www.gnu.org/software/gcc/gcc-11/porting_to.html, so that's not completely unexpected. I'd suggest to take a look at the Dockerfile instead for the time being, as that's still working fine.
Thanks for fast response.
I actually solved it by adding #include <algorithm>
include in these files in src
directory:
request_helpers.cpp
text_formatter.cpp
xml_formatter.cpp
Maybe it would help others in the future. After that, everything works fine.
Thanks again.
I think this need to be addressed at the latest when switching to Ubuntu 22.04. Until then, I'm leaving the issue open.