Switch to compiling WebRTC -std=c++14 by default
This is a canary CL to check if using c++14 feature breaks any webrtc user.
Bug: webrtc:10945
Change-Id: Iabaf8c06414c1ac960791bcb7cc46f5f5a5e1f14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151600
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29119}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 47825dc..0b943b51 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -3900,17 +3900,11 @@
bool PeerConnection::StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
int64_t output_period_ms) {
- // TODO(eladalon): In C++14, this can be done with a lambda.
- struct Functor {
- bool operator()() {
- return pc->StartRtcEventLog_w(std::move(output), output_period_ms);
- }
- PeerConnection* const pc;
- std::unique_ptr<RtcEventLogOutput> output;
- const int64_t output_period_ms;
- };
return worker_thread()->Invoke<bool>(
- RTC_FROM_HERE, Functor{this, std::move(output), output_period_ms});
+ RTC_FROM_HERE,
+ [this, output = std::move(output), output_period_ms]() mutable {
+ return StartRtcEventLog_w(std::move(output), output_period_ms);
+ });
}
bool PeerConnection::StartRtcEventLog(