Export of internal Abseil changes

--
b984c7c1cbee4253192c833046bfcfa16dca8ccf by Dino Radakovic <dinor@google.com>:

Restrict visibility of absl/flags:commandlineflag_internal

PiperOrigin-RevId: 438591894
Change-Id: I12a6392b2c7f9f1263c741dfd6c43ae22e903aad

--
81315601aab70bb6ac2d17655a727d7f9ee2ff95 by Justin Lebar <jlebar@google.com>:

Update example in str_join.h to use a lambda.

PiperOrigin-RevId: 438390035
Change-Id: Icc707b972e5a369a71ad774004fdf0a17a9b33a7

--
1c3c7921224e505faca8617b073f657d3737219f by Dino Radakovic <dinor@google.com>:

Internal change

PiperOrigin-RevId: 438386036
Change-Id: I6066da1b5a1ddf5af265944a31ed298297b4f2e1

--
2d6885f78481f04e0e7ee86060aec15b677144f3 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 438378389
Change-Id: If70dd9114114eb44e85afccd521e7fb7e1436b88

--
7f8282ddee7fcd032e01cbfe65c11c2d166cceb8 by Derek Mauro <dmauro@google.com>:

Internal change

PiperOrigin-RevId: 438374554
Change-Id: I993367952af1dc83bd5aa0ae19a64c024f457fdd

--
ce65ba28f6031e45db8fa5118a05410f5166fd7a by Abseil Team <absl-team@google.com>:

Spelling gardening: Heterogeneous has an "e" after the "n".

PiperOrigin-RevId: 438374411
Change-Id: If1a9098a5d04338837998883739c7b555efa62b4
GitOrigin-RevId: b984c7c1cbee4253192c833046bfcfa16dca8ccf
pull/1157/head
Abseil Team 3 years ago committed by rogeeff
parent b9ad9bbfed
commit 4dcae40a07
  1. 4
      absl/base/BUILD.bazel
  2. 3
      absl/flags/BUILD.bazel
  3. 3
      absl/memory/BUILD.bazel
  4. 2
      absl/strings/cord_ring_reader_test.cc
  5. 2
      absl/strings/internal/cordz_sample_token_test.cc
  6. 24
      absl/strings/str_join.h
  7. 2
      absl/strings/string_view_test.cc
  8. 4
      absl/synchronization/BUILD.bazel

@ -157,7 +157,9 @@ cc_library(
"internal/direct_mmap.h",
"internal/low_level_alloc.h",
],
copts = ABSL_DEFAULT_COPTS,
copts = ABSL_DEFAULT_COPTS + select({
"//conditions:default": [],
}),
linkopts = select({
"//absl:msvc_compiler": [],
"//absl:clang-cl_compiler": [],

@ -114,6 +114,9 @@ cc_library(
],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//visibility:private",
],
deps = [
"//absl/base:config",
"//absl/base:fast_type_id",

@ -29,6 +29,9 @@ cc_library(
name = "memory",
hdrs = ["memory.h"],
copts = ABSL_DEFAULT_COPTS,
defines = select({
"//conditions:default": [],
}),
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/base:core_headers",

@ -126,7 +126,7 @@ TEST(CordRingReaderTest, SeekForward) {
reader.Reset(ring);
size_t consumed = 0;
size_t remaining = ring->length;;
size_t remaining = ring->length;
for (int i = 0; i < flats.size(); ++i) {
CordRepRing::index_type index = ring->advance(head, i);
size_t offset = consumed;

@ -167,7 +167,7 @@ TEST(CordzSampleTokenTest, MultiThreaded) {
if (cord.data.is_profiled()) {
// 1) Untrack
cord.data.cordz_info()->Untrack();
cord.data.clear_cordz_info();;
cord.data.clear_cordz_info();
} else {
// 2) Track
CordzInfo::TrackCord(cord.data, kTrackCordMethod);

@ -72,21 +72,15 @@ ABSL_NAMESPACE_BEGIN
// functions. You may provide your own Formatter to enable `absl::StrJoin()` to
// work with arbitrary types.
//
// The following is an example of a custom Formatter that simply uses
// `std::to_string()` to format an integer as a std::string.
//
// struct MyFormatter {
// void operator()(std::string* out, int i) const {
// out->append(std::to_string(i));
// }
// };
//
// You would use the above formatter by passing an instance of it as the final
// argument to `absl::StrJoin()`:
//
// std::vector<int> v = {1, 2, 3, 4};
// std::string s = absl::StrJoin(v, "-", MyFormatter());
// EXPECT_EQ("1-2-3-4", s);
// The following is an example of a custom Formatter that uses
// `absl::FormatDuration` to join a list of `absl::Duration`s.
//
// std::vector<absl::Duration> v = {absl::Seconds(1), absl::Milliseconds(10)};
// std::string s =
// absl::StrJoin(v, ", ", [](std::string* out, absl::Duration dur) {
// absl::StrAppend(out, absl::FormatDuration(dur));
// });
// EXPECT_EQ("1s, 10ms", s);
//
// The following standard formatters are provided within this file:
//

@ -1189,7 +1189,7 @@ TEST(ComparisonOpsTest, StringCompareNotAmbiguous) {
EXPECT_LT("hello", std::string("world"));
}
TEST(ComparisonOpsTest, HeterogenousStringViewEquals) {
TEST(ComparisonOpsTest, HeterogeneousStringViewEquals) {
EXPECT_EQ(absl::string_view("hello"), std::string("hello"));
EXPECT_EQ("hello", absl::string_view("hello"));
}

@ -34,7 +34,9 @@ cc_library(
hdrs = [
"internal/graphcycles.h",
],
copts = ABSL_DEFAULT_COPTS,
copts = ABSL_DEFAULT_COPTS + select({
"//conditions:default": [],
}),
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",

Loading…
Cancel
Save