You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling v0.21.0 on an up-to-date x86 Arch Linux PC, I receive the following error:
(I have also observed this on the master branch as of 919f06e)
[ 50%] Building CXX object CMakeFiles/datachannel.dir/src/nalunit.cpp.o
<truncated>/libdatachannel/src/h264rtpdepacketizer.cpp: In member function ‘virtual void rtc::H264RtpDepacketizer::incoming(rtc::message_vector&, const rtc::message_callback&)’:
<truncated>/libdatachannel/src/h264rtpdepacketizer.cpp:116:29: error: ‘remove_if’ is not a member of ‘std’; did you mean ‘remove_cv’?
116 | messages.erase(std::remove_if(messages.begin(), messages.end(),
| ^~~~~~~~~
| remove_cv
make[2]: *** [CMakeFiles/datachannel.dir/build.make:328: CMakeFiles/datachannel.dir/src/h264rtpdepacketizer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:355: CMakeFiles/datachannel.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
From cppreference it seems that remove_if requires the <algorithm> header to be imported
I've attached the following patch that I used to test (below), but I'm not sure if this is the best place for the include since I am not familiar with the project. 0001-Include-algorithm-to-use-std-remove_if.patch.txt
The text was updated successfully, but these errors were encountered:
Thank you for reporting, this is fixed in #1176. Your patch is fine but I prefer headers needed only by the implementation to be imported in the .cpp file.
When compiling v0.21.0 on an up-to-date x86 Arch Linux PC, I receive the following error:
(I have also observed this on the master branch as of 919f06e)
From cppreference it seems that
remove_if
requires the<algorithm>
header to be importedI've attached the following patch that I used to test (below), but I'm not sure if this is the best place for the include since I am not familiar with the project.
0001-Include-algorithm-to-use-std-remove_if.patch.txt
The text was updated successfully, but these errors were encountered: