Replace as_const/void_t/no_fn type traits with their c++17 variants
webrtc own implementaions are no longer needed since webrtc uses c++17 Bug: None Change-Id: I38bb295334182b73d333a453001d256e6df172d9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270924 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37716}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
52701781b9
commit
9ee752aefb
@ -14,6 +14,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include "rtc_base/containers/move_only_int.h"
|
||||
@ -220,7 +221,7 @@ TEST(FlatMap, AtFunction) {
|
||||
EXPECT_EQ("b", m.at(2));
|
||||
|
||||
// Const reference works.
|
||||
const std::string& const_ref = webrtc::as_const(m).at(1);
|
||||
const std::string& const_ref = std::as_const(m).at(1);
|
||||
EXPECT_EQ("a", const_ref);
|
||||
|
||||
// Reference works, can operate on the string.
|
||||
@ -234,7 +235,7 @@ TEST(FlatMap, AtFunction) {
|
||||
// Heterogeneous look-up works.
|
||||
flat_map<std::string, int> m2 = {{"a", 1}, {"b", 2}};
|
||||
EXPECT_EQ(1, m2.at(absl::string_view("a")));
|
||||
EXPECT_EQ(2, webrtc::as_const(m2).at(absl::string_view("b")));
|
||||
EXPECT_EQ(2, std::as_const(m2).at(absl::string_view("b")));
|
||||
}
|
||||
|
||||
// insert_or_assign(K&&, M&&)
|
||||
|
||||
Reference in New Issue
Block a user