merge(3p/abseil_cpp): Merge upstream at 'ccdbb5941'
Change-Id: I6e85fc7b5f76bba1f1eef15e600a8acb64e97ef5
This commit is contained in:
commit
543379ce45
97 changed files with 3546 additions and 2316 deletions
|
|
@ -764,6 +764,12 @@ TEST_F(FormatConvertTest, LongDouble) {
|
|||
}
|
||||
}
|
||||
|
||||
// Regression tests
|
||||
//
|
||||
// Using a string literal because not all platforms support hex literals or it
|
||||
// might be out of range.
|
||||
doubles.push_back(std::strtold("-0xf.ffffffb5feafffbp-16324L", nullptr));
|
||||
|
||||
for (const char *fmt : kFormats) {
|
||||
for (char f : {'f', 'F', //
|
||||
'g', 'G', //
|
||||
|
|
|
|||
|
|
@ -224,13 +224,13 @@ class FractionalDigitGenerator {
|
|||
// This function will allocate enough stack space to perform the conversion.
|
||||
static void RunConversion(
|
||||
uint128 v, int exp, absl::FunctionRef<void(FractionalDigitGenerator)> f) {
|
||||
using Limits = std::numeric_limits<long double>;
|
||||
assert(-exp < 0);
|
||||
assert(-exp >= std::numeric_limits<long double>::min_exponent - 128);
|
||||
static_assert(
|
||||
StackArray::kMaxCapacity >=
|
||||
(128 - std::numeric_limits<long double>::min_exponent + 31) / 32,
|
||||
"");
|
||||
StackArray::RunWithCapacity((exp + 31) / 32,
|
||||
assert(-exp >= Limits::min_exponent - 128);
|
||||
static_assert(StackArray::kMaxCapacity >=
|
||||
(Limits::digits + 128 - Limits::min_exponent + 31) / 32,
|
||||
"");
|
||||
StackArray::RunWithCapacity((Limits::digits + exp + 31) / 32,
|
||||
[=](absl::Span<uint32_t> input) {
|
||||
f(FractionalDigitGenerator(input, v, exp));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue