Export of internal Abseil changes

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

Support C++20 erase_if API in btree.

See the reference here: https://en.cppreference.com/w/cpp/container/set/erase_if.

PiperOrigin-RevId: 286235196

--
952dd2fdd8435dd293e2186c97e14ef3f29a1aa6 by Derek Mauro <dmauro@google.com>:

Avoids accessing an out-of-bounds value during flag parsing

PiperOrigin-RevId: 286206167

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

Change null term* (and nul term*) to NUL-term* in comments.

PiperOrigin-RevId: 286066376

--
d770baecf36f3d7a8214ca2033d90696ba353d00 by Andy Soffer <asoffer@google.com>:

cmake: Fix x86_64 check on Windows for random copts

Import of https://github.com/abseil/abseil-cpp/pull/518

PiperOrigin-RevId: 286056395

--
9ed007e284ecf6ec79547437dbed9ce3023204b9 by Greg Falcon <gfalcon@google.com>:

Manual re-import of CCTZ from GitHub.  filegroup() moved as a side effect of an internal change.

PiperOrigin-RevId: 286015866

--
25441cc5cb7ee906177f8dac0dcd524df0e6e305 by Derek Mauro <dmauro@google.com>:

Fix implicit cycle in debugging build rules due to .inc files

PiperOrigin-RevId: 285873346
GitOrigin-RevId: a7e789be4687681b98060fddbf8bd1c64a8f5908
Change-Id: Idef8cce4e723fccae6bdd749e94e11e655908214
This commit is contained in:
Abseil Team 2019-12-18 11:46:26 -08:00 committed by CJ Johnson
parent bf86cfe165
commit 2923513914
11 changed files with 124 additions and 26 deletions

View file

@ -282,7 +282,7 @@ ConvertResult<Conv::s | Conv::p> FormatConvertImpl(const char *v,
} else if (conv.precision() < 0) {
len = std::strlen(v);
} else {
// If precision is set, we look for the null terminator on the valid range.
// If precision is set, we look for the NUL-terminator on the valid range.
len = std::find(v, v + conv.precision(), '\0') - v;
}
return {ConvertStringArg(string_view(v, len), conv, sink)};

View file

@ -154,7 +154,7 @@ TEST_F(FormatConvertTest, StringPrecision) {
UntypedFormatSpecImpl format("%.1s");
EXPECT_EQ("a", FormatPack(format, {FormatArgImpl(p)}));
// We cap at the nul terminator.
// We cap at the NUL-terminator.
p = "ABC";
UntypedFormatSpecImpl format2("%.10s");
EXPECT_EQ("ABC", FormatPack(format2, {FormatArgImpl(p)}));

View file

@ -402,7 +402,7 @@ int FPrintF(std::FILE* output, const FormatSpec<Args...>& format,
// type-safe); prefer `absl::SNPrintF()` over `std::snprintf()`.
//
// In particular, a successful call to `absl::SNPrintF()` writes at most `size`
// bytes of the formatted output to `output`, including a null terminator, and
// bytes of the formatted output to `output`, including a NUL-terminator, and
// returns the number of bytes that would have been written if truncation did
// not occur. In the event of an error, a negative value is returned and `errno`
// is set.