summaryrefslogtreecommitdiff
path: root/absl/strings/str_format.h
Commit message (Collapse)AuthorAge
* Fix behaviors of StrCat() and StrFormat() regarding char types and enum types.Gravatar Greg Falcon2023-06-12
| | | | | | | | | | | | | | | | | | | This is a conservative change, in that it only contains bugfixes and allows new patterns that used to be compile errors. There are other changes we would like to make (as reflected in the comments in char_formatting_test.cc), but we are being careful about the implications of such behavior changes. The two implementation changes are: * Apply integral promotions to enums before printing them, so they are always treated as integers (and not chars) by StrCat and StrFormat. * Classify `unsigned char` and `signed char` as integer-like rather than char-like, so that `StrFormat("%v", v)` accepts those types as integers (consistent with `StrCat()`.) The behavior changes are: * StrCat() now accepts char-backed enums (rather than failing to compile). * StrFormat("%v") now accepts `signed char` and `unsigned char` as integral (rather than failing to compile). * StrFormat("%v") now correctly formats 8-bit enums as integers (rather than failing internally and emitting nothing). Tested: Modified the char_formatting_test.cc case to reflect changes. Re-ran all other tests. PiperOrigin-RevId: 539659674 Change-Id: Ief56335f5a57e4582af396d00eaa9e7b6be4ddc6
* Clarify code comment to avoid confusion.Gravatar Abseil Team2023-03-30
| | | | | PiperOrigin-RevId: 520724148 Change-Id: Ia90c4a711649e89454bc2ca0a9d0d771d56e79c0
* Removing trailing period that can confuse a url in str_format.h.Gravatar Abseil Team2022-11-22
| | | | | PiperOrigin-RevId: 490329293 Change-Id: Ied36e737e85afc683cc7cc116ac6bc07092472df
* Updated documentation on use of %vGravatar Tom Manshreck2022-11-15
| | | | | | | Also updated documentation around FormatSink and PutPaddedString PiperOrigin-RevId: 488651398 Change-Id: Ic6c586dbb8bea61df841a142f12d22c7e5b03f43
* Adds documentation for stringification extensionGravatar Abseil Team2022-10-10
| | | | | PiperOrigin-RevId: 480166410 Change-Id: Ie915e98747ffda0d1f0e5a72383f5dd9fc940970
* Make sinks provided to `AbslStringify()` usable with `absl::Format()`.Gravatar Marcin Kowalczyk2022-10-05
| | | | | | | | Such sinks must define ADL-callable `AbslFormatFlush()`. It can just forward to `Append()`. PiperOrigin-RevId: 479043790 Change-Id: I5d7d80ca1e17adf03b77726df8a52e2b4e9196ce
* Adds support for "%v" in absl::StrFormat and related functions for ↵Gravatar Abseil Team2022-08-31
| | | | | | | string-like types (support for other builtin types will follow in future changes). Rather than specifying %s for strings, users may specify %v and have the format specifier deduced. Notably, %v does not work for `const char*` because we cannot be certain if %s or %p was intended (nor can we be certain if the `const char*` was properly null-terminated). If you have a `const char*` you know is null-terminated and would like to work with %v, please wrap it in a `string_view` before using it. PiperOrigin-RevId: 471321055 Change-Id: Ifbb50082d301baecc7edc277975f12e7ad3ecc8a
* Export of internal Abseil changesGravatar Abseil Team2021-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 007ce045d5d38a727ededdb5bf06e64785fd73bd by Martijn Vels <mvels@google.com>: Add `cord_enable_btree` feature flag (default false). PiperOrigin-RevId: 383729939 -- 98e7dc6a0407b0fd7b8713d883cdb3a766e0583d by Benjamin Barenblat <bbaren@google.com>: Eliminate some byte swapping from randen_slow Stop swapping bytes when serializing randen_slow’s Vector128 into and out of memory. Instead, simply index different bytes in the AES round function. This requires byte swapping the te{0..3} lookup tables, but it produces an 8% speedup on my Xeon W-2135. PiperOrigin-RevId: 383689402 -- 180b6bf45049188840d439b16a28e6b968669340 by Evan Brown <ezb@google.com>: Minor simplification in drop_deletes_without_resize() - save probe_offset outside the lambda. Also, add some consts, avoid an auto, and use lambda capture by value instead of reference. I realized that the compiler can already optimize this - https://godbolt.org/z/Wxd9c4TfK, but I think this way makes the code a bit clearer. PiperOrigin-RevId: 383646658 -- 781706a974c4dc1c0abbb6b801fca0550229e883 by Martijn Vels <mvels@google.com>: Change storage to contain 3 bytes. As per the comments in the code, this allows us to utilize all available space in CordRep that may otherwise be 'lost' in padding in derived clases. For the upcoming CordrepBtree class, we want a strong guarantee on having a 64 bytes aligned implementation. PiperOrigin-RevId: 383633963 -- 8fe22ecf92492fa6649938a2215934ebfe01c714 by Derek Mauro <dmauro@google.com>: Remove reference to str_format_arg.h, which no longer exists PiperOrigin-RevId: 383517865 -- 79397f3b18f18c1e2d7aea993b687329d626ce64 by Benjamin Barenblat <bbaren@google.com>: Use absl::uint128 for AES random number generator Replace randen’s internal 128-bit integer struct, u64x2, with absl::uint128. This eliminates some code and improves support for big-endian platforms. PiperOrigin-RevId: 383475671 GitOrigin-RevId: 007ce045d5d38a727ededdb5bf06e64785fd73bd Change-Id: Ia9d9c40de557221f1744fb0d6d4d6ca7ac569070
* Export of internal Abseil changesGravatar Abseil Team2020-06-18
| | | | | | | | | | | | | | | | | | | | | | | -- 34c0d521b11ed4191ea3e071a864a84e5e5941b7 by Matthew Brown <matthewbr@google.com>: Release absl::StrFormat custom type extensions - Allows StrFormat methods to be extended to accept types which implement AbslFormatConvert() - NOLINTNEXTLINE(readability-redundant-declaration) used, declarations are required in some compilers. PiperOrigin-RevId: 316963065 -- 4d475b5ad02d41057447d722ad35573fc4f48d1f by Evan Brown <ezb@google.com>: Small fix to previous change: the first overload of insert_iterator_unique wasn't actually being selected. Fix that issue and add tests to verify that it actually works. Note: couldn't use TestInstanceTracker here because that counts instances (and decrements in destructor) rather than counting all constructor calls. PiperOrigin-RevId: 316927690 GitOrigin-RevId: 34c0d521b11ed4191ea3e071a864a84e5e5941b7 Change-Id: If8bbb8317b93af4084ac4cc55b752b99b1581b58
* Export of internal Abseil changesGravatar Abseil Team2020-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- baf626d27ff1547776745f3b601cc42f703d4bdf by Greg Falcon <gfalcon@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 315486679 -- 39d4e7f9214c5a74e4ee4b8a7f4af26479925029 by Gennadiy Rozental <rogeeff@google.com>: Avoid order dependant test cases. PiperOrigin-RevId: 315327948 -- 8feb187703a28bb0c5cfc5dd6091e3faa90a8e61 by Gennadiy Rozental <rogeeff@google.com>: Avoid order dependant test cases. PiperOrigin-RevId: 315317018 -- cffd8fddad15908ec9de7f21f65b20528972e3fa by Gennadiy Rozental <rogeeff@google.com>: Avoid order dependant test cases. PiperOrigin-RevId: 315311587 -- 48997a0ceb231b75c14eb4b1eb3b66af69e49f42 by Tom Manshreck <shreck@google.com>: Nit: remove extra "the" PiperOrigin-RevId: 314959763 -- 9516f44a4b5d3055427c95e80c8c04a6321e4221 by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 314925147 -- 4f8691d74a4eb42ed03ef29c9588a01b78829941 by Abseil Team <absl-team@google.com>: Uninclude util/bits/bits.h PiperOrigin-RevId: 314858384 -- 02b42a8ec5e5561b29b4e5f93cc1482c3c72ef2d by Abseil Team <absl-team@google.com>: Google-internal changes only. PiperOrigin-RevId: 314855667 -- 146013d69dabafbe2030e23ced7b741d9e8d417c by Gennadiy Rozental <rogeeff@google.com>: Uninclude util/bits/bits.h PiperOrigin-RevId: 314838927 GitOrigin-RevId: baf626d27ff1547776745f3b601cc42f703d4bdf Change-Id: I2602286fb13cf35a88bdd80fe0b44974d4388d46
* Export of internal Abseil changesGravatar Abseil Team2020-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f012012ef78234a6a4585321b67d7b7c92ebc266 by Laramie Leavitt <lar@google.com>: Slight restructuring of absl/random/internal randen implementation. Convert round-keys.inc into randen_round_keys.cc file. Consistently use a 128-bit pointer type for internal method parameters. This allows simpler pointer arithmetic in C++ & permits removal of some constants and casts. Remove some redundancy in comments & constexpr variables. Specifically, all references to Randen algorithm parameters use RandenTraits; duplication in RandenSlow removed. PiperOrigin-RevId: 312190313 -- dc8b42e054046741e9ed65335bfdface997c6063 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 312167304 -- f13d248fafaf206492c1362c3574031aea3abaf7 by Matthew Brown <matthewbr@google.com>: Cleanup StrFormat extensions a little. PiperOrigin-RevId: 312166336 -- 9d9117589667afe2332bb7ad42bc967ca7c54502 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 312105213 -- 9a12b9b3aa0e59b8ee6cf9408ed0029045543a9b by Abseil Team <absl-team@google.com>: Complete IGNORE_TYPE macro renaming. PiperOrigin-RevId: 311999699 -- 64756f20d61021d999bd0d4c15e9ad3857382f57 by Gennadiy Rozental <rogeeff@google.com>: Switch to fixed bytes specific default value. This fixes the Abseil Flags for big endian platforms. PiperOrigin-RevId: 311844448 -- bdbe6b5b29791dbc3816ada1828458b3010ff1e9 by Laramie Leavitt <lar@google.com>: Change many distribution tests to use pcg_engine as a deterministic source of entropy. It's reasonable to test that the BitGen itself has good entropy, however when testing the cross product of all random distributions x all the architecture variations x all submitted changes results in a large number of tests. In order to account for these failures while still using good entropy requires that our allowed sigma need to account for all of these independent tests. Our current sigma values are too restrictive, and we see a lot of failures, so we have to either relax the sigma values or convert some of the statistical tests to use deterministic values. This changelist does the latter. PiperOrigin-RevId: 311840096 GitOrigin-RevId: f012012ef78234a6a4585321b67d7b7c92ebc266 Change-Id: Ic84886f38ff30d7d72c126e9b63c9a61eb729a1a
* Export of internal Abseil changesGravatar Abseil Team2020-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 2aa4544070113a4943f93464df74759f043bab92 by CJ Johnson <johnsoncj@google.com>: Spelling fix in InlinedVector PiperOrigin-RevId: 308241764 -- 0d8a8ff71023df845c490c73811da598a42f12d9 by Todd Jackson <tjackson@google.com>: Fix CMake warnings on absl/types/CMakeLists.txt. PiperOrigin-RevId: 308123331 -- f35fbd79437ba999097b1499770103b7865078e5 by Samuel Benzaquen <sbenza@google.com>: Speed up the integral printer. PiperOrigin-RevId: 308081531 -- b1676b869ed0547e1cca23c83bb370f459bdf2cb by Samuel Benzaquen <sbenza@google.com>: Collapse the template arguments to enums earlier to reduce the number of instantiations of FormatSpecTemplate. This doesn't affect opt builds much, but reduces the bloat in non-opt builds. PiperOrigin-RevId: 308066155 -- edda0c227adad392cfff2af6ed532822c481f013 by Abseil Team <absl-team@google.com>: Minor documentation fix for `absl::Status` CTOR. PiperOrigin-RevId: 308037725 -- 8326b85569f0fdb15632b0076e38baba4c69794b by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 307914168 GitOrigin-RevId: 2aa4544070113a4943f93464df74759f043bab92 Change-Id: I553ce3838c5e35d04954f560dc75ec24033919af
* Export of internal Abseil changesGravatar Abseil Team2020-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- d857e6e1f9b09a3eb5abd890677a98b23346f07a by Abseil Team <absl-team@google.com>: Simplify internal TryAcquireWithSpinning. No point declaring the `result` variable: we can just return the results directly. PiperOrigin-RevId: 307045800 -- 421952252bc23be51f47f7d23f3422bad1ed382c by Derek Mauro <dmauro@google.com>: Add custom sink support for `absl::Format()` through an ADL extension mechanism. Users can now define `void AbslFormatFlush(MySink* dest, absl::string_view part)` to allow `absl::Format()` to append to a custom sink. PiperOrigin-RevId: 306929052 -- c73d5cdb62cd58ea421ed1aeeab78a0ffcfeeefb by Matt Calabrese <calabrese@google.com>: Internal-only conformance-testing macro ABSL_INTERNAL_ASSERT_CONFORMANCE_OF for compile-time and runtime checks of a specified type, expected properties of that type, and a logically-ordered series of equivalence classes of that type. PiperOrigin-RevId: 306885512 -- a8c2495a07f37d68907855e3f0535bd5c27a3b52 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 306766753 GitOrigin-RevId: d857e6e1f9b09a3eb5abd890677a98b23346f07a Change-Id: Ic23c92ac74f9ffcbb2471ff8c6691f4b7b20354b
* Export of internal Abseil changesGravatar Abseil Team2020-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 91ca367a7548270155721bdda74611aeea2a2153 by Abseil Team <absl-team@google.com>: Replace the only usage of btree_node::swap with simpler logic using transfers and delete btree_node::swap. Add a benchmark for constructing small containers. PiperOrigin-RevId: 301169874 -- ff9d73a7125b7f8ab5733cda877204dfbfac138e by Derek Mauro <dmauro@google.com>: Ensure ABSL_CXX_STANDARD is set. Fixes #640 PiperOrigin-RevId: 301160106 -- 14ca0beee8c109e532134e7e9da7b072da1bf911 by Abseil Team <absl-team@google.com>: Rollback the change to make Cord iterators a fixed size. That change increased the iterator size, which can cause a deep recursion call to hit the stack memory limit, in turn causing a signal 11 failure. PiperOrigin-RevId: 301084915 -- 619e3cd9e56408bdb8b3b5a1e08dda1e95242264 by Matthew Brown <matthewbr@google.com>: Internal Change PiperOrigin-RevId: 300832828 -- 64f8d62ab4c4c78077dbe85a9595a8eeb6d16608 by Gennadiy Rozental <rogeeff@google.com>: Fix for empty braces support. We will call proper aggregate construction in case when {} is used as default value. In other words instead of "new T", we'll call "new T{}". PiperOrigin-RevId: 300715686 -- db3f65594d6db8b104b01262f884dff465b696ef by Abseil Team <absl-team@google.com>: Emscripten supports thread-local storage nowadays. PiperOrigin-RevId: 300675185 GitOrigin-RevId: 91ca367a7548270155721bdda74611aeea2a2153 Change-Id: I3344f745f9c3fc78775532b1808442fabd98e34a
* Export of internal Abseil changesGravatar Abseil Team2019-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 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
* Export of internal Abseil changesGravatar Abseil Team2019-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- c99f979ad34f155fbeeea69b88bdc7458d89a21c by Derek Mauro <dmauro@google.com>: Remove a floating point division by zero test. This isn't testing behavior related to the library, and MSVC warns about it in opt mode. PiperOrigin-RevId: 285220804 -- 68b015491f0dbf1ab547994673281abd1f34cd4b by Gennadiy Rozental <rogeeff@google.com>: This CL introduces following changes to the class FlagImpl: * We eliminate the CommandLineFlagLocks struct. Instead callback guard and callback function are combined into a single CallbackData struct, while primary data lock is stored separately. * CallbackData member of class FlagImpl is initially set to be nullptr and is only allocated and initialized when a flag's callback is being set. For most flags we do not pay for the extra space and extra absl::Mutex now. * Primary data guard is stored in data_guard_ data member. This is a properly aligned character buffer of necessary size. During initialization of the flag we construct absl::Mutex in this space using placement new call. * We now avoid extra value copy after successful attempt to parse value out of string. Instead we swap flag's current value with tentative value we just produced. PiperOrigin-RevId: 285132636 -- ed45d118fb818969eb13094cf7827c885dfc562c by Tom Manshreck <shreck@google.com>: Change null-term* (and nul-term*) to NUL-term* in comments PiperOrigin-RevId: 285036610 -- 729619017944db895ce8d6d29c1995aa2e5628a5 by Derek Mauro <dmauro@google.com>: Use the Posix implementation of thread identity on MinGW. Some versions of MinGW suffer from thread_local bugs. PiperOrigin-RevId: 285022920 -- 39a25493503c76885bc3254c28f66a251c5b5bb0 by Greg Falcon <gfalcon@google.com>: Implementation detail change. Add further ABSL_NAMESPACE_BEGIN and _END annotation macros to files in Abseil. PiperOrigin-RevId: 285012012 GitOrigin-RevId: c99f979ad34f155fbeeea69b88bdc7458d89a21c Change-Id: I4c85d3704e45d11a9ac50d562f39640a6adbedc1
* Export of internal Abseil changesGravatar Abseil Team2019-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 2f49cb9009386bc67bf54a2908c8720b749c8b7f by Greg Falcon <gfalcon@google.com>: docs: fix typo Import of https://github.com/abseil/abseil-cpp/pull/397 PiperOrigin-RevId: 277504420 -- f2bed362c1c12d3fa9c22d11f2b918668e8c37b7 by Abseil Team <absl-team@google.com>: Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain. PiperOrigin-RevId: 277502334 -- e33de894ffd49848b9e088f59acc9743d1661948 by Derek Mauro <dmauro@google.com>: Update rules_cc version. The mirror.bazel.build URL does not exist (cache expiration?) PiperOrigin-RevId: 277498394 -- b23757b0747c64634d2d701433782c969effef19 by Abseil Team <absl-team@google.com>: Fix https://github.com/abseil/abseil-cpp/issues/394. PiperOrigin-RevId: 277491405 -- 54c75b8b29813531c52d67cf0ba7063baae4a4f3 by Abseil Team <absl-team@google.com>: Fix comment typos: waker => waiter. PiperOrigin-RevId: 277376952 -- 874eeaa3b3af808fc88b6355245f643674f5e36e by Abseil Team <absl-team@google.com>: Don't use atomic ops on waiter and wakeup counts in CONDVAR waiter mode. Just guard the waiter and wakeup counts with the mutex. This eliminates the race. Also fix a typo in the error message for pthread_cond_timedwait. PiperOrigin-RevId: 277366017 -- ce8c9a63109214519b5a7eaecef2c663c4d566df by Greg Falcon <gfalcon@google.com>: Implement the config options for our four main C++ forward compatibility types. These options control whether the names `any`, `optional`, `string_view`, and `variant` in namespace `absl` are aliases to the corresponding C++17 types in namespace `std`. By default, we continue to auto-detect the configuration of the compiler being run. These options are not intended to be modified on the command line (as -D flags, say). Instead, the options.h file can be modified by distributors of Abseil (e.g., binary packagers, maintainers of local copies of Abseil, etc.) Changing options will change Abseil in an ODR sense. Any program must only link in a single version of Abseil. Linking libraries that use Abseil configured with different options is an error: there is no ABI compatibility guarantee when linking different configurations, even if the Abseil versions used are otherwise exactly identical. PiperOrigin-RevId: 277364298 -- 5ed3ad42ae43a05862070f92f9ffd07f5c1f2b81 by Chris Kennelly <ckennelly@google.com>: Suppress -Wimplicit-int-float-conversion. On recent builds of Clang, this is an error/warning. PiperOrigin-RevId: 277346168 -- 9b9b0055243c705189bb27d912e6d45a7789cdee by Eric Fiselier <ericwf@google.com>: Allow building Abseil as a shared library with CMake. By default CMake's `add_library` creates the target as a static library. However, users can override the default using the builtin CMake option -DBUILD_SHARED_LIBS=ON. This changes Abseil's CMake to respect this configuration option by removing the explicit `STATIC` in our usages of `add_library`. PiperOrigin-RevId: 277337753 -- 63a8b7b8ede3a9d851916929d6b8537f4f2508ca by Abseil Team <absl-team@google.com>: Improve AlphaNum Hex performance by using absl::numbers_internal::FastHexToBufferZeroPad16. PiperOrigin-RevId: 277318108 -- dd047f7e92032682d94b27732df0e4d0670e24a4 by CJ Johnson <johnsoncj@google.com>: Internal change PiperOrigin-RevId: 277316913 -- d19ee7074929fed08973cc5b40a844573ce1e0a6 by Abseil Team <absl-team@google.com>: Handle invoking [[nodiscard]] functions correctly in our tests. PiperOrigin-RevId: 277301500 -- 5373f3737894ba9b8481e95e5f58c7957c00d26a by Chris Kennelly <ckennelly@google.com>: For internal reasons, loosen visibility restrictions of `//absl/base:malloc_internal`. As an internal-namespace interface, this module remains unsupported. We reserve the right to change, delete, or re-restrict visibility to this target at any time. PiperOrigin-RevId: 277118689 -- 44e4f6655e05393a375d09b3625c192b1fde5909 by Abseil Team <absl-team@google.com>: Fix error in example civil day comment. PiperOrigin-RevId: 277103315 -- 7657392b4ce48469106f11cdb952a0bc76a28df3 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 277056076 -- c75bda76f40b01fa249b75b5a70c1f5907e56c76 by Abseil Team <absl-team@google.com>: Suppress lifetime constant-initialization tests when building with MSVC versions > 19.0. These are broken due to non-compliant initialization order in these versions: https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html We don't know when Microsoft will fix this bug. PiperOrigin-RevId: 277049770 -- 16c3b9bf2a1796efa57f97b00bcd6227fbccca1f by Matt Calabrese <calabrese@google.com>: Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain. PiperOrigin-RevId: 277048670 -- e91003fa3ee6026d9b80624a23fc144fa5d74810 by Chris Kennelly <ckennelly@google.com>: Fix -Wimplicit-int-float-conversion warning in latest clang PiperOrigin-RevId: 276771618 -- 53087ca6603e86ad815f3dd9ab795cc0f79792c1 by Andy Soffer <asoffer@google.com>: Add documentation on absl::SNPrintF. PiperOrigin-RevId: 276694032 -- a9426af8cbd4c3a8f9053e7446c821852e41ff61 by Jorg Brown <jorg@google.com>: Stop including kern/OSByteOrder.h in order to support __APPLE__ Apple compiles with clang now anyway, and clang has support for the built-in compiler swap functions that are much faster than any function call to the OS. PiperOrigin-RevId: 276625231 -- df974be5aa5b4dc1b09c356cb8816edfc7867e63 by Jorg Brown <jorg@google.com>: Fix the build for Android x86-64 builds, where __SSE4_2__ is defined but _bswap64 is not. PiperOrigin-RevId: 276542642 -- d99dc092b3a5ad17643005e55f3b3cb6b9187ccc by Jorg Brown <jorg@google.com>: Remove a byteswap from the non-SSE path of FastHexToBufferZeroPad16 Remove the need for including absl/base/internal/endian.h from the SSE case (since if we have the Intel SSE intrinsics, then clearly we also have the Intel Byte-Swap intrinsics.) PiperOrigin-RevId: 276532608 -- d67b106dc930d8558810ae3983613bb2ab1e0d36 by Abseil Team <absl-team@google.com>: Use explicit static_cast<double> for int64_t to double conversion This uses an explicit static_cast<double>() in the int64_t to double comparisons in duration.cc's SafeAddRepHi. This satisfies clang's -Wimplicit-int-to-float-conversion warning (with https://reviews.llvm.org/D64666). This may also make it easier for humans to realize that the comparison is happening between two floating point double precision values. It should have no impact on the behavior or generated code. Tested: No behavior change PiperOrigin-RevId: 276529211 GitOrigin-RevId: 2f49cb9009386bc67bf54a2908c8720b749c8b7f Change-Id: I71e0781893ce219960b8290d54b20532779cb0ff
* Export of internal Abseil changes.Gravatar Abseil Team2019-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 9c4ef32276054fba6a116c01cd4b3fd278f59ece by Andy Soffer <asoffer@google.com>: Remove support for unused arbitrary-width output in FastUniformBits. Width should be inferred from the requested return UIntType. PiperOrigin-RevId: 257189319 -- e3326329d02171a301cc3d6ae617ed448472b728 by Abseil Team <absl-team@google.com>: Update comments to make clear that absl::Format(std::string *, ...) appends to the provided string. PiperOrigin-RevId: 257058043 -- e2096b06d714fba3ea2c885d670a42efd872765c by Xiaoyi Zhang <zhangxy@google.com>: Fix compilation error on MSVC 2017. The root cause seems to be a compiler bug in VS 2017 about pack expansion with multiple parameter packs, specifically `MakeVisitationMatrixImpl::Run` is triggering compiler error "error C3528: 'BoundIndices': the number of elements in this pack expansion does not match the number of elements in 'EndIndices'". Work around this issue by using only one parameter pack `CurrIndices` in `MakeVisitationMatrixImpl::Run`. PiperOrigin-RevId: 257040381 -- 9ab75ff27b2513583fffc1233e6568aa96be36f7 by Matt Calabrese <calabrese@google.com>: Internal change. PiperOrigin-RevId: 257039041 GitOrigin-RevId: 9c4ef32276054fba6a116c01cd4b3fd278f59ece Change-Id: I5f708bb03aff93948502394a413260af2a8a273b
* Export of internal Abseil changes.Gravatar Abseil Team2019-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- fc61fc3822d414a1abda906a81208d2667195de3 by Abseil Team <absl-team@google.com>: Clarify documentation relating to the output of the various printing functions. PiperOrigin-RevId: 253041344 -- 06cb414d1006cd89e38b381d52763b048909d69a by Jorg Brown <jorg@google.com>: Change absl::container_internal::CompressedTuple to instantiate its internal Storage class with the name of the type it's holding, rather than the name of the Tuple. This is not an externally-visible change, other than less compiler memory is used and less debug information is generated. PiperOrigin-RevId: 252940185 -- 33b3f3ed6037eac7d1b7989a3641370e92beaeb9 by Jorg Brown <jorg@google.com>: Change absl::container_internal::CompressedTuple to instantiate its internal Storage class with the name of the type it's holding, rather than the name of the Tuple. This is not an externally-visible change, other than less compiler memory is used and less debug information is generated. PiperOrigin-RevId: 252902091 -- 88595f4e7d6ac57bebdc9811045867f5d7477b5b by Abseil Team <absl-team@google.com>: Unset thread_local/__thread support for Emscripten. PiperOrigin-RevId: 252706297 -- cabd1715d873dc457271940335c764e62defb952 by Derek Mauro <dmauro@google.com>: Rollback LLVM and Bazel version due to intermittent network failures downloading from GitHub PiperOrigin-RevId: 252661245 GitOrigin-RevId: fc61fc3822d414a1abda906a81208d2667195de3 Change-Id: I4c30995a2db7acef19415ad519259131584db261
* Export of internal Abseil changes.Gravatar Abseil Team2019-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ab1a58c85a462884413ec0022dc1fff19ccb8602 by Abseil Team <absl-team@google.com>: Clarified the documentation in str_format.h to say that use of absl::FormatSpec is ok for wrapper functions. Added tests that express this. PiperOrigin-RevId: 247657991 -- fef9481e58d579f1514babcb960ca60a51883fd8 by CJ Johnson <johnsoncj@google.com>: Adds exception safety tests for InlinedVector::InlinedVector() and InlinedVector::InlinedVector(const allocator_type&). PiperOrigin-RevId: 247617048 -- ef3217e1cd1e9a6ff5f2025e061b8ce3735af78f by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 247614063 -- ed4c3345c4a04d8ec5c9e627058f17fce55925b1 by CJ Johnson <johnsoncj@google.com>: Update InlinedVector::clear() Introduces inlined_vector_exception_safety_test with the first test (clear), adds new benchmarks (for clear), and updates the implementation of clear. PiperOrigin-RevId: 247496049 -- 144a3a77c93bc8b2226da6f4b56166ee3d9868de by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 247482532 -- 286bbb89e154d5424955b644edad5fe04be487f8 by Derek Mauro <dmauro@google.com>: Add scripts to run ASAN and TSAN on CI. PiperOrigin-RevId: 247479658 GitOrigin-RevId: ab1a58c85a462884413ec0022dc1fff19ccb8602 Change-Id: Ief4c5a62587d0c59d405735df469d498aa6bf101
* Export of internal Abseil changes.Gravatar Abseil Team2019-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- bdce7e57e9e886eff1114d0266781b443f7ec639 by Derek Mauro <dmauro@google.com>: Change {Get|Set}EnvironmentVariable to {Get|Set}EnvironmentVariableA for compatibility with /DUNICODE. PiperOrigin-RevId: 239229514 -- 2276ed502326a044a84060d34eb19d499e3a3be2 by Derek Mauro <dmauro@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 239228622 -- a462efb970ff43b08a362ef2343fb75ac1295a50 by Derek Mauro <dmauro@google.com>: Adding linking of CoreFoundation to CMakeLists in absl/time. Import https://github.com/abseil/abseil-cpp/pull/280. Fix #283 PiperOrigin-RevId: 239220785 -- fc23327b97f940c682aae1956cf7a1bf87f88c06 by Derek Mauro <dmauro@google.com>: Add hermetic test script that uses Docker to build with a very recent version of gcc (8.3.0 today) with libstdc++ and bazel. PiperOrigin-RevId: 239220448 -- 418c08a8f6a53e63b84e39473035774417ca3aa7 by Derek Mauro <dmauro@google.com>: Disable part of the variant exeception safety test on move assignment when using versions of libstd++ that contain a bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87431#c7 PiperOrigin-RevId: 239062455 -- 799722217aeda79679577843c91d5be62cbcbb42 by Matt Calabrese <calabrese@google.com>: Add internal-only IsSwappable traits corresponding to std::is_swappable and std::is_nothrow_swappable, which are used with the swap implementations of optional and variant. PiperOrigin-RevId: 239049448 -- aa46a036038a3de5c68ac5e5d3b4bf76f818d2ea by CJ Johnson <johnsoncj@google.com>: Make InlinedVectorStorage constructor explicit PiperOrigin-RevId: 239044361 -- 17949715b3aa21c794701f69f2154e91b6acabc3 by CJ Johnson <johnsoncj@google.com>: Add absl namesapce to internal/inlined_vector.h PiperOrigin-RevId: 239030789 -- 834628325953078cc08ed10d23bb8890e5bec897 by Derek Mauro <dmauro@google.com>: Add test script that uses Docker to build Abseil with gcc-4.8, libstdc++, and cmake. PiperOrigin-RevId: 239028433 -- 80fe24149ed73ed2ced995ad1e372fb060c60427 by CJ Johnson <johnsoncj@google.com>: Factors data members of InlinedVector into an impl type called InlinedVectorStorage so that (in future changes) the contents of a vector can be grouped together with a single pointer. PiperOrigin-RevId: 239021086 -- 585331436d5d4d79f845e45dcf79d918a0dc6169 by Derek Mauro <dmauro@google.com>: Add -Wno-missing-field-initializers to gcc compiler flags. gcc-4.x has spurious missing field initializer warnings. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750 PiperOrigin-RevId: 239017217 -- 94602fe4e33ee3a552a7f2939c0f57a992f55075 by Abseil Team <absl-team@google.com>: Formatting fixes. PiperOrigin-RevId: 238983038 -- a1c1b63c08505574e0a8c491561840cecb2bb93e by Derek Mauro <dmauro@google.com>: Add hermetic test script that uses Docker to build with a very recent version of clang with libc++ and bazel. PiperOrigin-RevId: 238669118 -- e525f8d20bc2f79a0d69336b902f63858f3bff9d by Derek Mauro <dmauro@google.com>: Disable the test optionalTest.InPlaceTSFINAEBug until libc++ is updated. PiperOrigin-RevId: 238661703 -- f99a2a0b5ec424a059678f7f226600f137b4c74e by Derek Mauro <dmauro@google.com>: Correct the check for the FlatHashMap-Any test bug (list conditions instead of platforms when possible) PiperOrigin-RevId: 238653344 -- 777928035dbcbf39f361eb7d10dc3696822f692f by Jon Cohen <cohenjon@google.com>: Add install rules for Abseil CMake. These are attempted to be limited to in-project installation. This serves two purposes -- first it's morally the same as using Abseil in-source, except you don't have to rebuild us every time. Second, the presence of an install rule makes life massively simpler for package manager maintainers. Currently this doesn't install absl tests or testonly libraries. This can be added in a follow-up patch. Fixes #38, Fixes #80, Closes #182 PiperOrigin-RevId: 238645836 -- ded1c6ce697c191b7a6ff14572b3e6d183117b2c by Derek Mauro <dmauro@google.com>: Add hermetic test script that uses Docker to build with a very recent version of clang with libstdc++ and bazel. PiperOrigin-RevId: 238517815 GitOrigin-RevId: bdce7e57e9e886eff1114d0266781b443f7ec639 Change-Id: I6f745869cb8ef63851891ccac05ae9a7dd241c4f
* Changed HTTP URLs to HTTPS where possible (#270)Gravatar nik72732019-03-08
|
* Export of internal Abseil changes.Gravatar Abseil Team2019-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f9f068aa8a260dc576398e47b8e4540902e41358 by Derek Mauro <dmauro@google.com>: Fix test string with embedded NUL. Currently parses as octal. PiperOrigin-RevId: 237088193 -- d271ffdd3f450f817f6d30e98ff39d439aaf3a98 by Abseil Team <absl-team@google.com>: Make symbolizer examine any mapping with read+exec permission regardless of 'w' bit. PiperOrigin-RevId: 237056461 -- af315f8306d36a7367a452fd0b58cafdbf20719d by Abseil Team <absl-team@google.com>: Switch comments referencing base:: CondVar and Mutex to absl::. PiperOrigin-RevId: 236917884 -- c624d5d1c0bdb917bff5e651ba40599472f84e0e by Gennadiy Rozental <rogeeff@google.com>: Internal change PiperOrigin-RevId: 236898300 -- 3cdc82429af964846d1152f49148abc61d196a4b by Samuel Benzaquen <sbenza@google.com>: Make the `long double` overload if AbslHashValue a template to avoid invalid conversions with implicit operators. This overload was never meant to capture anything other than `long double` and any current caller to it that wasn't a `long double` is potentially a bug. In particular, any type with an implicit `bool` conversion is calling this overload instead of trying to find a hash<> specialization, thus causing pretty bad hash behavior. PiperOrigin-RevId: 236877073 GitOrigin-RevId: f9f068aa8a260dc576398e47b8e4540902e41358 Change-Id: If9cc008dd814f0ca06ed881f612c06575f1f7137
* Export of internal Abseil changes.Gravatar Abseil Team2019-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 2c12ae8d6cbb8cbeb3ff446393578dd0d6d0cf8c by Andy Getzendanner <durandal@google.com>: Fix printf POSIX reference link to point at printf(3) (the C API) instead of printf(1) (the shell utility). PiperOrigin-RevId: 231719473 -- a36b3a0e539b5ca2033bb25438aa325ac84a285a by CJ Johnson <johnsoncj@google.com>: Fixes "correct" but poor semantics `allocator_and_tag_` initializations in InlinedVector to the proper version that gets a reference/const reference to allocator_type PiperOrigin-RevId: 231691608 -- de5eca5c7146a1e4692a201804817d98354d20ec by CJ Johnson <johnsoncj@google.com>: Removes pathologically deleted move constructor and assignment operator from benchmark test type PiperOrigin-RevId: 231680297 -- b2b52859e5f0e14a25047e528c8163b12ea9ca32 by Matt Armstrong <marmstrong@google.com>: Assert on elapsed time, not absolute time. This is a cosmetic change that aims to make test failures clearer. Human readers no longer need to do as much mental math to deduce the magnitude of the failure. It does not change the semantics of the test assertions. PiperOrigin-RevId: 231644805 GitOrigin-RevId: 2c12ae8d6cbb8cbeb3ff446393578dd0d6d0cf8c Change-Id: Ic121a26a7a6bb7441da6a8c1d7797bee4f705fdc
* Export of internal Abseil changes.Gravatar Abseil Team2018-08-22
| | | | | | | | | | | -- f4bb8afa9376b4120f56f3beff7b07260da4a5c2 by CJ Johnson <johnsoncj@google.com>: Add user to Github list PiperOrigin-RevId: 209630262 GitOrigin-RevId: f4bb8afa9376b4120f56f3beff7b07260da4a5c2 Change-Id: I3fedf35011d805ee4a20b92e073b43523b47d15b
* Export of internal Abseil changes.Gravatar Abseil Team2018-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | -- 9850e5567db4ab7cf4928e68d1c6e232d9845fff by Abseil Team <absl-team@google.com>: Add missing file parameter for FPrintF example. PiperOrigin-RevId: 208238843 -- e3aa5daed78a2d38f0f19c20db93d6b9cca54041 by Abseil Team <absl-team@google.com>: Internal cleanup. PiperOrigin-RevId: 208216296 -- 6ec960705441f7ae7383214160cf78244b0ac614 by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 208111059 GitOrigin-RevId: 9850e5567db4ab7cf4928e68d1c6e232d9845fff Change-Id: I3ceef9b66ffc8d434eb522f79479581975e780e6
* Export of internal Abseil changes.Gravatar Abseil Team2018-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 6befc69900cd77b5af55d1235b2c74dbeb37fbeb by Alex Strelnikov <strel@google.com>: move ExtendedParsedFormat PiperOrigin-RevId: 202336028 -- 3adf2a6358189b28e9bdf982c4fd3110e24fb84b by Alex Strelnikov <strel@google.com>: Internal change. PiperOrigin-RevId: 202330527 -- 8fdd1e8aee74992f5d4f3ab79739e6272feca7a8 by Alex Strelnikov <strel@google.com>: move ExtendedParsedFormat PiperOrigin-RevId: 202317418 -- c618725b2320d5c4292ea479b877c848ccdf2e6b by Alex Strelnikov <strel@google.com>: Release strings:numbers_benchmark PiperOrigin-RevId: 202297686 -- 7c9f6132034a5a32160f56ca0dd0a4edcd476928 by Matt Kulukundis <kfm@google.com>: Internal change PiperOrigin-RevId: 202230893 -- bf1a0e1724e87e4fb55165997562efa9c8d081c5 by Juemin Yang <jueminyang@google.com>: move ExtendedParsedFormat PiperOrigin-RevId: 202199857 GitOrigin-RevId: 6befc69900cd77b5af55d1235b2c74dbeb37fbeb Change-Id: Iafe46260e141de9f34b130b9d968a0ea542151d1
* Export of internal Abseil changes.Gravatar Abseil Team2018-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 8becce38c862a044db194a9aea1b505796a46d6f by Abseil Team <absl-team@google.com>: Updates the FixedArray's constructors to be exception safe by preventing double deletions. Also adds exception safety tests for FixedArray to document/enforce the expected behavior. PiperOrigin-RevId: 201964431 -- 794188b401a602b4be97190fb8738066fe1f9ca5 by Derek Mauro <dmauro@google.com>: Fixes for str_format.h documentation. PiperOrigin-RevId: 201951760 -- beae3bdd6eee2cf61101102fddc35ada188f330b by Alex Strelnikov <strel@google.com>: Add numeric_limits specialization for uint128. Turns out numeric_limits is a case where the consensus is that it is okay to specialize for a user defined type. PiperOrigin-RevId: 201944736 -- b2b3444a52b36878ade1ae8801e69932b05fc4f9 by Shaindel Schwartz <shaindel@google.com>: Internal change. PiperOrigin-RevId: 201718662 -- aa924c459922f39caabfc193998c58d0f4981ac0 by Abseil Team <absl-team@google.com>: Typo fix. PiperOrigin-RevId: 201692176 -- bbfcaa7b1af331d9b97c92470608240c5c864fbc by Xiaoyi Zhang <zhangxy@google.com>: Use ABSL_HAVE_ANY/OPTIONAL/VARIANT to conditionally compile out the definition of absl::bad_any_cast, absl::bad_optional_access, absl::bad_variant_access. This would fix the issues where users #include those header directly in C++17 modes. PiperOrigin-RevId: 201683792 GitOrigin-RevId: 8becce38c862a044db194a9aea1b505796a46d6f Change-Id: I60a7ad043136a439d82c374d225a1804016b0509
* Export of internal Abseil changes.Gravatar Abseil Team2018-06-22
-- 70f43a482d7d4ae4a255f17ca02b0106653dd600 by Shaindel Schwartz <shaindel@google.com>: Internal change PiperOrigin-RevId: 201571193 -- 93e6e9c2e683158be49d9dd1f5cb1a91d0c0f556 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 201567108 -- fbd8ee94fbe9f2448e5adf5e88706f9c8216048f by Juemin Yang <jueminyang@google.com>: str_format release PiperOrigin-RevId: 201565129 -- 387faa301555a8a888c4429df52734aa806dca46 by Abseil Team <absl-team@google.com>: Adds a defaulted allocator parameter to the size_type constructor of InlinedVector PiperOrigin-RevId: 201558711 -- 39b15ea2c68d7129d70cbde7e71af900032595ec by Matt Calabrese <calabrese@google.com>: Update the variant implementation to eliminate unnecessary checking on alternative access when the index is known or required to be correct. PiperOrigin-RevId: 201529535 -- adab77f1f7bb363aa534297f22aae2b0f08889ea by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 201458388 -- a701dc0ba62e3cadf0de14203415b91df4ee8151 by Greg Falcon <gfalcon@google.com>: Internal cleanup PiperOrigin-RevId: 201394836 -- 8a7191410b8f440fdfa27f722ff05e451502ab61 by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 201369269 GitOrigin-RevId: 70f43a482d7d4ae4a255f17ca02b0106653dd600 Change-Id: I8ab073b30b4e27405a3b6da2c826bb4f3f0b9af6