Replace deprecated std::not2 with a lambda
std::not2 is deprecated in C++17, and that starts failing on C++17 mode
of ios_simulator build. This CL replaces it with a lambda to avoid the
warning.
Bug: chromium:752720
Change-Id: Id7ef847df0fbe0c44583ef3320e06f44644de929
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128620
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#27198}
diff --git a/pc/sdp_utils.cc b/pc/sdp_utils.cc
index b20a667..6a899af 100644
--- a/pc/sdp_utils.cc
+++ b/pc/sdp_utils.cc
@@ -51,7 +51,12 @@
bool SdpContentsNone(SdpContentPredicate pred,
const cricket::SessionDescription* desc) {
- return SdpContentsAll(std::not2(pred), desc);
+ return SdpContentsAll(
+ [pred](const cricket::ContentInfo* content_info,
+ const cricket::TransportInfo* transport_info) {
+ return !pred(content_info, transport_info);
+ },
+ desc);
}
void SdpContentsForEach(SdpContentMutator fn,