This will let us deprecate the declarations without triggering warnings in Abseil itself.
PiperOrigin-RevId: 894202105
Change-Id: I57bb2a1647be1fedf9b724a07042fd0f564ce074
Mark the explicit floating point construct as constexpr for `absl::int128`.
PiperOrigin-RevId: 806159592
Change-Id: Ib68b34bd82c77c050fc090e0c7794761c41d22f1
as the number of positions to rotate by
Previously the code was negating INT_MIN, which is undefined
PiperOrigin-RevId: 770318129
Change-Id: Iff94b0e3d5777b2f488f2d48b6f8220f47bdada3
With gcc <= 12, std::bit_width<T>() returns T, not int, so make sure the
absl:: equivalents return the correct type.
https://github.com/abseil/abseil-cpp/issues/1890
PiperOrigin-RevId: 760612745
Change-Id: Ibbbe6eaa1aab677ecd747cf40765f6443eefe628
* Fix many benchmarks to be cc_binary instead of cc_test
* Add a few benchmarks for StrFormat
* Add benchmarks for Substitute
* Add benchmarks for Damerau-Levenshtein distance used in flags
PiperOrigin-RevId: 738448552
Change-Id: I521f4b2ef9116c9895b44c32d27e94507380bee8
Signed integer overflow is undefined behavior.
Our UBSAN tests were missing `-fno-sanitize-recover`, which
means UBSAN logs a warning, but the program continues,
causing the test not to fail.
`-fno-sanitize-recover` will be added once all errors are fixed.
PiperOrigin-RevId: 733753582
Change-Id: Icd3441e5ade957461965dfe6b2f8909d585a6a76
In this change, //absl/status is intentionally excluded because of
complication with SWIG compatibility. This may be handled separately.
PiperOrigin-RevId: 731387819
Change-Id: I71bf2e02f3a477d65575d467f5e5ab163846d31e
Linux "latest" containers updated to
GCC 14.2
CMake 3.31.2
Bazel 8.0.0
Included are various fixes to get these versions to work.
Bazel now references repositories by their canonical names from the
Bazel Central Registry. For example, Abseil is now @abseil-cpp instead
of @com_google_absl, and GoogleTest is now @googletest instead of
@com_google_googletest. Users still using the old WORKSPACE system may
need to use `repo_mapping` on repositories using the old names. See
`WORKSPACE.bazel` in this commit for an example.
PiperOrigin-RevId: 709102146
Change-Id: I02327ed4f8fb947766480bdeef2b1930a7f831eb
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1777
This patch replaces all instances of
std::ldexp(msb, 64)
with
msb * (2**64)
as it turns out that this optimization is not done by MSVC. Worse, it emited a function call with error checking, even if the int128 cannot hit the inf limitation.
Sadly even the constant `std::ldexp(1.0, 64)` is not inlined: https://gcc.godbolt.org/z/oGhGz77sx
Merge a21b1c9524 into 878313658e
Merging this change closes#1777
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1777 from degasus:int128_t a21b1c9524
PiperOrigin-RevId: 688968524
Change-Id: Id88cf38e241553f88bf4d97e7b001247dcd5599b
This fix increases the hash quality of these types.
Also, make sure that absl::(u)int128 have the same hash expansion as their intrinsic counterparts.
PiperOrigin-RevId: 685706878
Change-Id: Ib8e2e2b7a8ce24cf08f1e8d18094188a6eedbb3a
CountTrailingZeroesNonzero16 and CountLeadingZeroes16 when they are
available.
GCC 14 and Clang 19 adds these new builtins. The g-suffix is for
"generic". The s-suffix on __builtin_ctzs and __builtin_clzs is for
"short". GCC never implemented the short versions and #1664 reports
GCC 14 (pre-release) gives an error here, although this may be a
pre-release bug.
Fixes#1664
PiperOrigin-RevId: 630408249
Change-Id: I4aedcc82b85430f50d025f8eb1cab089c6fcd1bc
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1652
this change fixes errors emitted by MS compiler:
```
1>C:\abseil-cpp\absl\numeric\int128.h(278,20): error C4996: 'std::float_denorm_style': warning STL4042: std::float_denorm_style, std::numeric_limits::has_denorm, and std::numeric_limits::has_denorm_loss are deprecated in C++23. You can define _SILENCE_CXX23_DENORM_DEPRECATION_WARNING or _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning.
```
Merge 7be9635001 into 7efc308b31
Merging this change closes#1652
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1652 from pps83:float_denorm_style-warn 7be9635001
PiperOrigin-RevId: 626124710
Change-Id: I5fc2b5758dcb3956164dbec1e8559f241a0d7bf7
The layering_check feature ensures that rules that include a header
explicitly depend on a rule that exports that header. Compiler support
is required, and currently only Clang 16+ supports diagnoses
layering_check failures.
The parse_headers feature ensures headers are self-contained by
compiling them with -fsyntax-only on supported compilers.
PiperOrigin-RevId: 572350144
Change-Id: I37297f761566d686d9dd58d318979d688b7e36d1
prior to 18.0 to workaround libc++ having the wrong signature for
these functions.
Upstream issue: https://github.com/llvm/llvm-project/issues/64544
The preprocessor conditions were inverted for readability as the
conditions became more complex.
PiperOrigin-RevId: 557559472
Change-Id: Ibf7a2651e13a0d2a91846bc0d72ba3a44f56747b
Previously this was guarded with macros that are defined by <bit> itself.
Note that libc++ also had a bug that was fixed last week
a4f0764aef
PiperOrigin-RevId: 543511181
Change-Id: I1b8efa32f721ad450f8d1803c6c6c8373ad0371c
This change fixes -Wimplicit-const-int-float-conversion warnings
by making the conversions explicit.
PiperOrigin-RevId: 520707623
Change-Id: Ib6917469120cd7458257195cbf39beb3fd397543
https://bugs.llvm.org/show_bug.cgi?id=38289 has been addressed since 2019.
We just have to check to see if the clang being used to compile with is any version before major version 9.
disassembly under LLVM. Due to the issue described in
https://github.com/abseil/abseil-cpp/issues/1340 and
8545dfb3ea
it no longer builds under GCC.
The other changes are necessary to fix the build using the latest benchmark snapshot
Fixes#1340
PiperOrigin-RevId: 494809290
Change-Id: I4a03b2e2dcbdc273e59f1f09f204322e388e7cea
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL enables these warnings and fixes the remaining known issues.)
Bug: chromium:1292951
PiperOrigin-RevId: 480981210
Change-Id: I92d5023c6833e24d6aa29b10d433116329972f41
The change breaks existing code by changing the return type of absl::bit_width.
PiperOrigin-RevId: 465295951
Change-Id: Id4ce7c2ac3699ce22aa2b4851a949f9e0104a3d7
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in dirs n-t, except string.)
Bug: chromium:1292951
PiperOrigin-RevId: 465287204
Change-Id: I0fe98ff78bf3c08d86992019eb626755f8b6803e
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL focuses on .cc files in strings/, except /internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 465285043
Change-Id: I37e9d1b4c4e9aa655b720da1467927af2aba995e
This change introduces the symbol
ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
to guard redundant declarations of static constexpr data
members that are needed prior to C++17.
This change also introduces the symbol
ABSL_INTERNAL_CPLUSPLUS_LANG, which is supposed to be set
to the same value as __cplusplus, except it uses _MSVC_LANG
on MSVC so that the value is correct on MSVC.
Neither of these new symbols should be used outside of Abseil.
Fixes#1191
PiperOrigin-RevId: 453923908
Change-Id: I1316c52c19fa0c168b93cced0c817e4cb7c9c862
ARM64EC is a Microsoft-designed ARM64 ABI compatible with AMD64
applications on ARM64 Windows 11. The ARM64EC does not support
_umul128 and __rdtsc as x64 intrinsics, though it provides inline
function implementations for them, by emulation. Since the code
already has portable code paths without using the intrinsics,
instead of using the emulated intrinsic implementations, we use
the said portable code paths for ARM64EC.
--
7473df9e4922c589f6b27cf546aad097381ae552 by Martijn Vels <mvels@google.com>:
Make ABSL_ASSUME publicly available
PiperOrigin-RevId: 430540224
Change-Id: I760e2d86e3a0b676cd2a6d26e0225a77381e948f
--
c83e38bc421f715b3c1e20150c2f1ffe8e633028 by Abseil Team <absl-team@google.com>:
Alias absl::bind_front to std::bind_front if available
This avoids ambiguity between the two when enabling C++20.
PiperOrigin-RevId: 430486679
GitOrigin-RevId: 7473df9e4922c589f6b27cf546aad097381ae552
Change-Id: I1e9bba09a8946480ce10ddd28e86b6c86191d38c
--
0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439 by Abseil Team <absl-team@google.com>:
Revise documentation of bit_cast:
* Removes inappropriate examples (round-tripping pointers, serialization), for which reinterpret_cast is more appropriate.
* Removes mention of "bit representation", which is not an explicit notion in C++. The best we get is "byte representation".
* Removes a circular defition of "bitcast" as itself, and instead explains what it does.
* Removes the mathism "for some values of", which is probably not totally accessible to a general audience, and in any case needless verbiage.
* Fixes comments in the example.
* Replaces some colloquialisms with simpler, more direct language.
PiperOrigin-RevId: 421791786
--
e04e64df55d93c1b9a09c0483b97cc4d8763260d by Derek Mauro <dmauro@google.com>:
Update Docker image to use GCC 11.2, Clang 14 (prerelease),
CMake 3.22.1, and Bazel 4.2.2
PiperOrigin-RevId: 421658559
--
d002bb3dc5cd1fc5b4cbd79a450efc894caa567c by Chris Kennelly <ckennelly@google.com>:
Add a small microbenchmark for absl::bit_width.
PiperOrigin-RevId: 421604852
--
131b057d1b76ecd7170421b48d661bb958ff676b by Evan Brown <ezb@google.com>:
Adds a disabled test for EBO in nested `CompressedTuple`s.
PiperOrigin-RevId: 421413134
--
e34c7876d3a1212d90c73c030ccae6169b682d43 by Jorg Brown <jorg@google.com>:
Show users a better error message if they pass a pointer to absl::Uniform.
PiperOrigin-RevId: 421090472
GitOrigin-RevId: 0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439
Change-Id: I5a004e8d17e974fa4897a09d1466ae8fc65dfdbb