summaryrefslogtreecommitdiff
path: root/absl
Commit message (Collapse)AuthorAge
* Enhance documentation about absl::Duration integer division, whichGravatar Abseil Team2023-03-15
| | | | | | | truncates, and floating-point multiplication/division, which rounds. PiperOrigin-RevId: 517016481 Change-Id: I3b0c357ea7236f2c0231df5e6b47c742c3f40047
* Add StrContainsIgnoreCase() to strings/match.h; all the other case-sensitive ↵Gravatar Greg Falcon2023-03-15
| | | | | | | methods in this file have corresponding case-insensitive ones. PiperOrigin-RevId: 516933773 Change-Id: Iaec41afd923b10bc493ad864c0ecfe85a1fe2db8
* Workaround for MSVC warning that designated initializers are a C++20 featureGravatar Derek Mauro2023-03-15
| | | | | | | | | | | | https://google.github.io/styleguide/cppguide.html#Designated_initializers recommends using designated initializers as does https://abseil.io/tips/172, but apparently they are a non-standard extension prior to C++20. For maximum compatibility, avoid using them here. Fixes #1413 PiperOrigin-RevId: 516892890 Change-Id: Id7b7857891e39eb52132c3edf70e5bf4973755af
* Avoid uninitialized value in call_once implementation.Gravatar Henner Zeller2023-03-15
| | | | | | | | | | | | | There is a path in which the guard_result_ member is not initialized; this is benign as the code makes sure that it only accesses an initialized state. Static analysis tools (such as clang-tidy) might not see that however, so to make them happy, initialize that value. PiperOrigin-RevId: 516876319 Change-Id: I1bd2e97ad9e1daaa1397f306df993de13f7e684e
* Synchronization: Add support for true relative timeouts usingGravatar Derek Mauro2023-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | monotonic clocks on Linux when the implementation uses futexes After this change, when synchronization methods that wait are passed an absl::Duration to limit the wait time, these methods will wait for that interval, even if the system clock is changed (subject to any limitations with how CLOCK_MONOTONIC keeps track of time). In other words, an observer measuring the time with a stop watch will now see the correct interval, even if the system clock is changed. Previously, the duration was added to the current time, and methods would wait until that time was reached on the possibly changed realtime system clock. The behavior of the synchronization methods that take an absl::Time is unchanged. These methods always wait until the absolute point in time is reached and respect changes to the system clock. In other words, an observer will always see the timeout occur when a wall clock reaches that time, even if the clock is manipulated externally. Note: ABSL_PREDICT_FALSE was removed from the error case in Futex as timeouts are handled by this case, and timeouts are part of normal operation. PiperOrigin-RevId: 516534869 Change-Id: Ib70b83e4be3f9e3f1727646975a21a1d30acb242
* Correct semantic and documentation for the ReportUnrecognizedFlags interfaceGravatar Gennadiy Rozental2023-03-13
| | | | | PiperOrigin-RevId: 516411395 Change-Id: I442fc9435bd7a829802c325e2e4106aa6775c263
* Support AbslStringify in absl::Time and absl::Duration.Gravatar Abseil Team2023-03-13
| | | | | PiperOrigin-RevId: 516363556 Change-Id: Iae5e781d46dc8a8c4242ab460b57b65271b93159
* Synchronization: Change KernelTimeout to always store absoluteGravatar Derek Mauro2023-03-13
| | | | | | | | | | timeouts, but when a relative timeout is provided, the timeout is an absolute timeout against a steady clock (when possible). This allows methods that return relative timeouts to automatically recompute the remaining duration, for instance, on suprious wakeups. PiperOrigin-RevId: 516304139 Change-Id: I7d739cb50dd749eba5dba7ac6c34d18dc53703ed
* Performance improvement for absl::AsciiStrToUpper() and absl::AsciiStrToLower()Gravatar Abseil Team2023-03-13
| | | | | PiperOrigin-RevId: 516275043 Change-Id: I906ef0d96dddf12e3738490bd26cb05753ec008c
* Add ABSL_ATTRIBUTE_NO_UNIQUE_ADDRESS helper.Gravatar Chris Kennelly2023-03-13
| | | | | PiperOrigin-RevId: 516245113 Change-Id: Idaef538c9392decbfdeb3ed3b3c109c795f92f4d
* [absl] Update documentation to reflect hash support for std::wstring, ↵Gravatar Lawrence Wolf-Sonkin2023-03-10
| | | | | | | std::u16string and std::u32stringstrings PiperOrigin-RevId: 515726337 Change-Id: I08e184ec1f7169835c034ac45a7e87293dc53078
* Rollback Mutex relative timeout support because of internal incompatibilityGravatar Abseil Team2023-03-09
| | | | | PiperOrigin-RevId: 515427893 Change-Id: I89e8756fcf400459b0226d14785c6511ad3e380b
* Improve readability of ::testing::ElementsAre and ::testing::Le in unit ↵Gravatar Abseil Team2023-03-09
| | | | | | | tests assertions. PiperOrigin-RevId: 515396682 Change-Id: I1b07d94611323569b199e1f4d03c7c49147c6bfb
* Add note about using `CurrentThreadIdentityIfPresent()` on darwin based ↵Gravatar Dave MacLachlan2023-03-09
| | | | | | | platforms. PiperOrigin-RevId: 515353041 Change-Id: I2c88022d50a3351f70d09a2d63020470889752d9
* Merge pull request #1395 from AtariDreams:constGravatar Copybara-Service2023-03-08
|\ | | | | | | | | PiperOrigin-RevId: 515105001 Change-Id: I4a8ce8291ef3df23108dd21d8adb6752cde92dd0
* | Introduce two new public APIs for parsing command line flags.Gravatar Gennadiy Rozental2023-03-08
| | | | | | | | | | | | | | | | | | | | | | ParseAbseilFlagsOnly To be used to parse Abseil Flags only and classify the rest of the arguments. ReportUnrecognizedFlags To be used to report unrecognized flags. PiperOrigin-RevId: 515082682 Change-Id: I73271b56cc512a5e78b5fcd035564b3672d62ca8
* | Synchronization: Add support for true relative timeouts usingGravatar Derek Mauro2023-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | monotonic clocks on Linux when the implementation uses futexes After this change, when synchronization methods that wait are passed an absl::Duration to limit the wait time, these methods will wait for that interval, even if the system clock is changed (subject to any limitations with how CLOCK_MONOTONIC keeps track of time). In other words, an observer measuring the time with a stop watch will now see the correct interval, even if the system clock is changed. Previously, the duration was added to the current time, and methods would wait until that time was reached on the possibly changed realtime system clock. The behavior of the synchronization methods that take an absl::Time is unchanged. These methods always wait until the absolute point in time is reached and respect changes to the system clock. In other words, an observer will always see the timeout occur when a wall clock reaches that time, even if the clock is manipulated externally. Note: ABSL_PREDICT_FALSE was removed from the error case in Futex as timeouts are handled by this case, and timeouts are part of normal operation. PiperOrigin-RevId: 515043788 Change-Id: I151127b588065bd1316273f36d7c946545c2c892
| * Use const and static for member functionsGravatar Rose2023-03-07
|/ | | | This shows that these are member functions that do not modify a class's data.
* Internal Code ChangeGravatar Abseil Team2023-03-06
| | | | | PiperOrigin-RevId: 514567673 Change-Id: I02721d424f01965a7a5e08c06487af358c853627
* Support lvalue references to incomplete types as `FunctionRef` parameters.Gravatar Abseil Team2023-03-06
| | | | | PiperOrigin-RevId: 514451518 Change-Id: Ic1391374c7bff08ba437ac0410631d1f701bb9ed
* Use multiple empty generations so that we can detect when iterators from ↵Gravatar Evan Brown2023-03-02
| | | | | | | different empty hashtables are compared. PiperOrigin-RevId: 513568915 Change-Id: I3f387d0bae0e86749dff540e4fdd5037304ac975
* Change from `ABSL_DLL ABSL_CONST_INIT` to `ABSL_CONST_INIT ABSL_DLL`Gravatar Derek Mauro2023-03-01
| | | | | | | This avoids "error: an attribute list cannot appear here" PiperOrigin-RevId: 513430681 Change-Id: I0fd31771793ee4cb66149ef4ce3e3e064dfb260d
* Merge pull request #1409 from georgthegreat:explicit-insertsGravatar Copybara-Service2023-03-01
|\ | | | | | | | | PiperOrigin-RevId: 513430584 Change-Id: I944a4868565564f32133dbff8b7a952221bb8b88
* | Delete the `Throw()` function from `absl::base_internal`.Gravatar Devin Jeanpierre2023-03-01
| | | | | | | | | | | | | | This was originally added in order to centralize the ifdefs, in cl/164484905. However, cl/337142938 undid this aspect of the change, because it broke on Android. What is left is vestigial: `Throw()` can be deleted at no loss, with a warning that should discourage us from ever reintroducing it. PiperOrigin-RevId: 513391041 Change-Id: I1608a2007eb26ee95df07f3b4b1672c034743832
* | Finally delete ArgListAction after cleanup is completed.Gravatar Gennadiy Rozental2023-03-01
| | | | | | | | | | PiperOrigin-RevId: 513379475 Change-Id: I0d7af3a0d2bf4da6eec66a5320ecc402d2e8fec8
* | Rollback because of internal incompatibility.Gravatar Abseil Team2023-02-28
| | | | | | | | | | PiperOrigin-RevId: 512979517 Change-Id: I7fe38ed246e42e6f8eb322e15c3b299215163168
* | Fix //absl/{base,debugging:symbolize} build with MingwGravatar Abseil Team2023-02-28
| | | | | | | | | | PiperOrigin-RevId: 512974770 Change-Id: If7a8128996d2a73ac566faaa676ddd3858d51af6
* | Eliminate internal ArgvListAction enum.Gravatar Gennadiy Rozental2023-02-27
| | | | | | | | | | PiperOrigin-RevId: 512697257 Change-Id: I828ac7a4ada482d60beba767ef9da6e2c0077c33
* | Move lambda from ExtractInvoker in AnyInvocable to a separate functionGravatar Abseil Team2023-02-27
| | | | | | | | | | PiperOrigin-RevId: 512664112 Change-Id: I344fd425f52081c0662d7cd0ffa2eefd98fd18fe
* | Remove backfills of some type traits that are now fully supportedGravatar Derek Mauro2023-02-27
| | | | | | | | | | PiperOrigin-RevId: 512622121 Change-Id: If90aaf7939062bd475253c372d9d7950c98c7150
| * Fix compiling int128.cc against certain STLsGravatar Yuriy Chernyshov2023-02-27
|/
* Remove extra space in comment.Gravatar Abseil Team2023-02-24
| | | | | PiperOrigin-RevId: 512155216 Change-Id: Ie66d29bd48ba8523f5fb7f835f721d9aec637eba
* Update the predicate for `ABSL_INTERNAL_HAS_RTTI` for Windows builds.Gravatar Abseil Team2023-02-24
| | | | | | | | | | | | | | | | | | | Abseil defines `ABSL_INTERNAL_HAS_RTTI` by: ``` !defined(__GNUC__) || defined(__GXX_RTTI) ``` This predicate correctly decides rtti for GNU platforms. This predicate is always true for non-GNU platforms. It is not true that rtti is always enabled for non-GNU platforms. For example, when building with `cl.exe` and disabling rtti with `\GR-`, this clause is true. This leads to errors in Windows builds that disable rtti. This default behavior is not decidably correct, but the default behavior shouldn't change. It is better to guess that rtti is on, because if rtti is actually off, compilation will fail, and no programs will be harmed. This change updates the non-default behavior to include a check for rtti on Windows platforms. This change preserves the default behavior. PiperOrigin-RevId: 512085922 Change-Id: I1add0b9b8ca2de5d1313c8aed5ba2019632ab68a
* Initialize ScopedMockLog.is_triggered_ with false.Gravatar Abseil Team2023-02-23
| | | | | | | | | In C++20, this happens by default, but in C++17, it's left uninitialized if no logs are sent and StartCapturingLogs is never called. The destructor then makes an attempt to access it, which is both unsafe and not very useful while it is uninitialized. Also add a test that expects the appropriate CHECK fail when StartCapturingLogs is not called. PiperOrigin-RevId: 511865440 Change-Id: Ie23ff3f901e926761d5f487e10d33c21c3bd43d3
* Optimize ConvertSpecialToEmptyAndFullToDeleted on ArmGravatar Connal de Souza2023-02-23
| | | | | | | BM_DropDeletes 73.4µs ± 0% 68.9µs ± 1% -6.22% (p=0.008 n=5+5) PiperOrigin-RevId: 511813266 Change-Id: Id28cece454d583e2dfe060e27cfc4720f987f009
* Merge pull request #1393 from AtariDreams:cppGravatar Copybara-Service2023-02-22
|\ | | | | | | | | PiperOrigin-RevId: 511696041 Change-Id: I77a87c8721f64e0d9e9a70e08a7127312488ff21
* \ Merge pull request #1402 from AtariDreams:workaroundGravatar Copybara-Service2023-02-22
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 511695308 Change-Id: I502cdc75e993582eaca5cd91ed068238936a9640
* | | Add CalculateBase64EscapeLen variations for the 3 base64 escaping methods ↵Gravatar Abseil Team2023-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | (Base64Escape, WebSafeBase64Escape, WebSafeBase64EscapeWithPadding). Also update CalculateBase64EscapedLen() documentation (it references outdated Base64Escape API), and reference it from WebSafeBase64Escape (to match Base64Escape). PiperOrigin-RevId: 511647760 Change-Id: I7dee18645c2a779c0762bc71da75a4684ec2493f
* | | Merge pull request #1403 from AtariDreams:c++11Gravatar Copybara-Service2023-02-22
|\ \ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 511539869 Change-Id: I32d5e91537b078691988e7e6d3244c682eb8d7d2
* | | | Fix out of bounds array access when deadlock detector finds exceptionally ↵Gravatar Abseil Team2023-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | large cycles. PiperOrigin-RevId: 511536497 Change-Id: If70a1c72ef5f7cbb4a80100c4edff459373a5d55
* | | | Merge pull request #1388 from miladfarca:fix-Read1To3-on-BEGravatar Copybara-Service2023-02-22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 511499093 Change-Id: I9ea2bbc38cbe8bd9dae937626d8faac41c010b38
| | * | | Resolve TODO: remove C++11 workaroundsGravatar Rose2023-02-22
| |/ / / |/| | | | | | | | | | | We no longer support C++11 as per the Google C++ support documentation: we support C++14 and up, so we can remove these workarounds.
* | | | Merge pull request #1394 from AtariDreams:constructorsGravatar Copybara-Service2023-02-21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 511271203 Change-Id: I1ed352e06265b705b62d401a50b4699d01f7f1d7
* \ \ \ \ Merge pull request #1401 from AtariDreams:appleGravatar Copybara-Service2023-02-21
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 511270860 Change-Id: Ib7de8c72505bf141d450f950074a27f9f4f1613c
* | | | | | Refactor swisstable iterator debug messages code. The motivations are (a) ↵Gravatar Evan Brown2023-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | distinguish between the "likely erased" and "could have rehashed" cases when generations are enabled, (b) suggest running under ASan when generations aren't enabled and doing so would narrow down the possible error cases, and (c) make ABSL_INTERNAL_ASSERT_IS_FULL not be a macro. PiperOrigin-RevId: 511255275 Change-Id: I5a44a813cd310837d0bd0209d2187b100be201e7
* | | | | | absl: fix potential int overflow in ELF readingGravatar Abseil Team2023-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both e_shentsize and e_shstrndx are uint16, so the product elf_header.e_shentsize * elf_header.e_shstrndx can overflow the promoted type int (MAX_UINT16 * MAX_UINT16 > MAX_INT), which is undefined behavior. Not sure if it can affect any real cases or not, though. Cast e_shentsize to loff_t instead of e_shoff. This makes both multiplication and addition to use loff_t type. PiperOrigin-RevId: 511254775 Change-Id: I39c493bfb539cca6742aae807c50718d31e7c001
| * | | | | Remove check for apple_build_version for hash workaroundGravatar Rose2023-02-21
|/ / / / / | | | | | | | | | | | | | | | Apple's clang fork has the missing commit now, and we can safely use the above codepath.
| | | * / Remove workaround for gcc 5.1Gravatar Rose2023-02-21
| |_|/ / |/| | | | | | | | | | | We support GCC 7 and up, so we can remove this.
* | | | Merge pull request #1390 from AtariDreams:defaultGravatar Copybara-Service2023-02-17
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | PiperOrigin-RevId: 510549728 Change-Id: I4447197b56dc76aaf4dd4e78671de247af2a91e8
| | * | | Convert empty constructors to default onesGravatar Rose2023-02-17
| |/ / / |/| | | | | | | | | | | These make the changed constructors match closer to the other ones that are default.