Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/2069
Fix documentation inconsistencies in absl/strings/escaping.h:
- Add missing `true` return value documentation to
WebSafeBase64Unescape(), aligning it with the parallel
Base64Unescape() which already documents this.
- Fix missing closing backtick in WebSafeBase64Escape() comment
(`dest` was unterminated).
- Fix inconsistent single quotes to backticks on `src`/`dest`
references, matching the style used elsewhere in the file.
Merge 0616be3080 into fe126c727b
Merging this change closes#2069
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/2069 from DrishtiTripathi2230:docs/websafe-base64-unescape-return-value 0616be3080
PiperOrigin-RevId: 924786942
Change-Id: Idcd6d27e1da696614cd8c9417bb6facb277d1d47
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/2064Fixes#1478
absl::StrFormat compile-time format string checking relies on
__attribute__((format(...))), a GCC/Clang-specific compiler extension
that MSVC does not support. This adds a note to the file-level
documentation so MSVC users are aware that format string errors will
only be caught at runtime, not at compile time.
Merge 81977d7954 into e7a10c8ec2
Merging this change closes#2064
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/2064 from DrishtiTripathi2230:docs/strformat-msvc-compile-time-check 81977d7954
PiperOrigin-RevId: 922922072
Change-Id: I91f545b6a1e64f3d8aba3350ac6332cb9548a40a
This associates debug information with the assertion sites, allowing clearer stack-traces for assertion failures and better accounting of the performance overhead of assertions.
PiperOrigin-RevId: 910863016
Change-Id: Ic615a9eeb8ad4b3f8c035074df4ff8347190e5c7
absl::HighPrecision produces a string with enough precision that it
can be parsed back to the original floating-point value.
PiperOrigin-RevId: 908689724
Change-Id: Ib076de9e32b0168ce587ea676088f05c8abe7e95
`std::monostate` is a struct without any fields thus there is no content to be printed at all. However, the default printer prints it as `"unprintable value of size 1 @{some address}"` which is not very useful unless we're really interested in the address of struct having nothing.
PiperOrigin-RevId: 906966193
Change-Id: I7121bd9d58ac9930fa19432d76788d1df6dc5b78
This will let us deprecate the declarations without triggering warnings in Abseil itself.
PiperOrigin-RevId: 906360966
Change-Id: Iee362ac0eac647909ef38003280f1179813f764d
be exported. The one function that is currently using it is easily
implemented with absl::Base64Escape().
PiperOrigin-RevId: 900830658
Change-Id: I859d67efafd5ba96921bb75c9207438975d055d6
Most usages of absl::void_t compile fine with std::void_t, so we migrate them here. A few don't compile due to overly eager template instantiations, so we leave those.
PiperOrigin-RevId: 897231619
Change-Id: Iad34101916dac2b995257ebd5d6aacb9a0acfa32
This will let us deprecate the declarations without triggering warnings in Abseil itself.
PiperOrigin-RevId: 895480358
Change-Id: I2e15877c15ed83f48ddb68cc73344c14b533bc68
This will let us deprecate the declarations without triggering warnings in Abseil itself.
PiperOrigin-RevId: 894202105
Change-Id: I57bb2a1647be1fedf9b724a07042fd0f564ce074
When falling back to resize(), the entire resized block gets
initialized, which causes pathological behavior in the case of many
small appends. reserve() fixes this problem.
PiperOrigin-RevId: 877497660
Change-Id: I3ae8b45d74a62f975b1050851fe6fd9561071bec
When using the fallback, resize() is used, which initializes the
entire block, which causes pathological behavior in the case of many
small appends.
PiperOrigin-RevId: 877019230
Change-Id: If685b888ba55233c3c7436a6af19333561308424
absl::variant, and related types
The corresponding headers are removed from cc files, but kept in
headers to prevent breakages from transitive dependencies.
PiperOrigin-RevId: 872421685
Change-Id: I867d4c3f7c9e422289c63816d44719b0530fb0a6
that use an output parameter.
These versions are clearly inferior to the versions that return
a string.
This is a response to https://github.com/abseil/abseil-cpp/issues/2015Fixes#2015
PiperOrigin-RevId: 870281461
Change-Id: I92f23d51d05a243dde88c997c1e8448819c5bc77
For example, \x100000041 could overflow a 32-bit integer and result in
0x41 ('A'), bypassing the exceeds 0xFF check. While this may be hard
to exploit, it is better to be safe and correct.
PiperOrigin-RevId: 868181068
Change-Id: I7d7763e0fe248f7cd7a4cfcc73554d7b20355795
This library contains helper functions that allow throwing exceptions
consistently from anywhere, without risk of ODR violations. When
execptions are disabled, these functions abort the program.
The old internal spellings will be removed in a follow up change.
PiperOrigin-RevId: 867594519
Change-Id: Ibd7a447f5577247bced718617f5da662d983d185
StringResizeAndOverwriteImpl()
This change bridges the gap between the legacy uninitialized resize
behavior and the modern absl::StringResizeAndOverwrite(). The internal
StringResizeAndOverwriteImpl function is used directly because the
public Abseil API requires the buffer to be initialized, whereas these
legacy functions rely on the behavior of leaving it uninitialized
(which is technically UB but relied upon here).
This is part of the work to migrate away from these legacy
utilities.
PiperOrigin-RevId: 855779916
Change-Id: If22484048024eae8ddedd29ebb08e8884e0198a3
prior to C++17. `absl::string_view` is now an alias for `std::string_view`.
It is recommended that clients simply use `std::string_view`.
PiperOrigin-RevId: 845822478
Change-Id: I220530c84118e5b9ef110baa002c232ac8f2c5f2
Detection isn't perfect, but it is better than nothing:
https://godbolt.org/z/YzeMeb58j
PiperOrigin-RevId: 837204651
Change-Id: Id1027c4c27bd95ad923e4c5d242a28079b16db79