Roll abseil_revision 731689ffc2..8d9cef25c7
No .def changes.
Change Log:
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+log/731689ffc2..8d9cef25c7
Full diff:
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/731689ffc2..8d9cef25c7
Bug: None
Change-Id: Ibba29062dc975b86002d9781fe0e80b65f5baefd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3625715
Auto-Submit: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Danil Chapovalov <danilchap@chromium.org>
Commit-Queue: Danil Chapovalov <danilchap@chromium.org>
Cr-Commit-Position: refs/heads/main@{#999278}
NOKEYCHECK=True
GitOrigin-RevId: a19fc8488501ffca1b2d43995522200b9a0bec5e
diff --git a/README.chromium b/README.chromium
index 438c7a2..e6641ac 100644
--- a/README.chromium
+++ b/README.chromium
@@ -4,7 +4,7 @@
License: Apache 2.0
License File: LICENSE
Version: 0
-Revision: 731689ffc2ad7bb95cc86b5b6160dbe7858f27a0
+Revision: 8d9cef25c70321c794ff5559cc0b1e0fa5f85e72
Security Critical: yes
Description:
diff --git a/absl/container/flat_hash_map.h b/absl/container/flat_hash_map.h
index cbb2469..e6bdbd9 100644
--- a/absl/container/flat_hash_map.h
+++ b/absl/container/flat_hash_map.h
@@ -361,8 +361,8 @@
// `flat_hash_map`.
//
// iterator try_emplace(const_iterator hint,
- // const init_type& k, Args&&... args):
- // iterator try_emplace(const_iterator hint, init_type&& k, Args&&... args):
+ // const key_type& k, Args&&... args):
+ // iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args):
//
// Inserts (via copy or move) the element of the specified key into the
// `flat_hash_map` using the position of `hint` as a non-binding suggestion
diff --git a/absl/container/node_hash_map.h b/absl/container/node_hash_map.h
index c91cae6..6868e63 100644
--- a/absl/container/node_hash_map.h
+++ b/absl/container/node_hash_map.h
@@ -352,8 +352,8 @@
// `node_hash_map`.
//
// iterator try_emplace(const_iterator hint,
- // const init_type& k, Args&&... args):
- // iterator try_emplace(const_iterator hint, init_type&& k, Args&&... args):
+ // const key_type& k, Args&&... args):
+ // iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args):
//
// Inserts (via copy or move) the element of the specified key into the
// `node_hash_map` using the position of `hint` as a non-binding suggestion
diff --git a/absl/functional/BUILD.bazel b/absl/functional/BUILD.bazel
index f9f2b9c..dbfa81f 100644
--- a/absl/functional/BUILD.bazel
+++ b/absl/functional/BUILD.bazel
@@ -78,9 +78,9 @@
)
cc_test(
- name = "function_ref_benchmark",
+ name = "function_type_benchmark",
srcs = [
- "function_ref_benchmark.cc",
+ "function_type_benchmark.cc",
],
copts = ABSL_TEST_COPTS,
tags = ["benchmark"],
diff --git a/absl/functional/function_ref_benchmark.cc b/absl/functional/function_type_benchmark.cc
similarity index 98%
rename from absl/functional/function_ref_benchmark.cc
rename to absl/functional/function_type_benchmark.cc
index 045305b..1b27eeb 100644
--- a/absl/functional/function_ref_benchmark.cc
+++ b/absl/functional/function_type_benchmark.cc
@@ -1,4 +1,4 @@
-// Copyright 2019 The Abseil Authors.
+// Copyright 2022 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "absl/functional/function_ref.h"
-
+#include <functional>
#include <memory>
+#include <string>
#include "benchmark/benchmark.h"
#include "absl/base/attributes.h"
+#include "absl/functional/function_ref.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
diff --git a/absl/memory/memory_test.cc b/absl/memory/memory_test.cc
index 1990c7b..5d5719b 100644
--- a/absl/memory/memory_test.cc
+++ b/absl/memory/memory_test.cc
@@ -548,22 +548,23 @@
TEST(AllocatorTraits, FunctionsMinimal) {
int trace = 0;
int hint;
- TestValue x(&trace);
+ alignas(TestValue) char buffer[sizeof(TestValue)];
+ auto* x = reinterpret_cast<TestValue*>(buffer);
MinimalMockAllocator mock;
using Traits = absl::allocator_traits<MinimalMockAllocator>;
- EXPECT_CALL(mock, allocate(7)).WillRepeatedly(Return(&x));
- EXPECT_CALL(mock, deallocate(&x, 7));
+ EXPECT_CALL(mock, allocate(7)).WillRepeatedly(Return(x));
+ EXPECT_CALL(mock, deallocate(x, 7));
- EXPECT_EQ(&x, Traits::allocate(mock, 7));
+ EXPECT_EQ(x, Traits::allocate(mock, 7));
static_cast<void>(Traits::allocate(mock, 7, static_cast<const void*>(&hint)));
- EXPECT_EQ(&x, Traits::allocate(mock, 7, static_cast<const void*>(&hint)));
- Traits::deallocate(mock, &x, 7);
+ EXPECT_EQ(x, Traits::allocate(mock, 7, static_cast<const void*>(&hint)));
+ Traits::deallocate(mock, x, 7);
+ EXPECT_EQ(0, trace);
+ Traits::construct(mock, x, &trace);
EXPECT_EQ(1, trace);
- Traits::construct(mock, &x, &trace);
- EXPECT_EQ(2, trace);
- Traits::destroy(mock, &x);
- EXPECT_EQ(1, trace);
+ Traits::destroy(mock, x);
+ EXPECT_EQ(0, trace);
EXPECT_EQ(std::numeric_limits<size_t>::max() / sizeof(TestValue),
Traits::max_size(mock));
diff --git a/absl/status/statusor.h b/absl/status/statusor.h
index d6ebdc2..a6d2911 100644
--- a/absl/status/statusor.h
+++ b/absl/status/statusor.h
@@ -477,7 +477,7 @@
// StatusOr<T>::ok()
//
// Returns whether or not this `absl::StatusOr<T>` holds a `T` value. This
- // member function is analagous to `absl::Status::ok()` and should be used
+ // member function is analogous to `absl::Status::ok()` and should be used
// similarly to check the status of return values.
//
// Example: