Commit Graph

14 Commits

Author SHA1 Message Date
Derek Mauro
dee6c62837 Remove unused include of resize_uninitialized.h
PiperOrigin-RevId: 875788912
Change-Id: I221428e693a26b59c69e3ef62a2c267f636737b8
2026-02-26 10:36:28 -08:00
Derek Mauro
4dbcee4b9e Use the new absl::StringResizeAndOverwrite() in absl::StrJoin()
PiperOrigin-RevId: 821692002
Change-Id: I47d1e8ef24fdef314f96eb28f5d36d098570d0e6
2025-10-20 10:00:25 -07:00
Justin Bassett
9e764b4f25 Factor out some iterator traits detection code
There are a few different cases where we check iterator categorization, mostly for forward iterators for preallocating buffers of the correct size. Factoring this out makes it easier to make all of these cases support the C++20 iterator model.

PiperOrigin-RevId: 725791190
Change-Id: Icf9d687654618c7ceff98ec76ec59e83c682dd6b
2025-02-11 15:19:06 -08:00
Valery Mironov
cbfe51b2c0 PR #1672: Optimize StrJoin with tuple without user defined formatter
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1672

https://github.com/abseil/abseil-cpp/discussions/1671

Merge ddcbb2466b into eba8db7baf

Merging this change closes #1672

COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1672 from MBkkt:optimize-str-join ddcbb2466b
PiperOrigin-RevId: 633988391
Change-Id: I2b3904211a29de3a768fb90a7fc106d7ff6c03e7
2024-05-15 09:56:10 -07:00
Abseil Team
43c36ffae6 Add explicit #include directives for <tuple>, "absl/base/config.h", and "absl/strings/string_view.h".
PiperOrigin-RevId: 617232899
Change-Id: I5e6c0bd4545d7f7ad9c5c494017269e247f620a3
2024-03-19 11:11:13 -07:00
Derek Mauro
74df6975ae Add additional checks for size_t overflows
This change mainly affects 32-bit platforms. Similar to
4618865caf, check for size_t overflow
in all places where string result sizes are precomputed before allocation.

PiperOrigin-RevId: 615792028
Change-Id: I71c774c5ef2c2978bd812c70e9bab36d266b7c90
2024-03-14 08:45:13 -07:00
Abseil Team
3e1983c5c0 Export of internal Abseil changes
--
a9ea60e9c0ccd744b6f12fd021dbedfe826dfe84 by Matt Kulukundis <kfm@google.com>:

Add an internal hook to allow keeping flags in sync with global state.

Rollforward, except continue including hashtablez_flags.h in absl_flags.h so users don't break.

PiperOrigin-RevId: 412198044

--
183e5c440b68c797ce4a82102f94f41c97a14674 by Martijn Vels <mvels@google.com>:

Internal cleanups and changes

PiperOrigin-RevId: 412083793

--
3740faf7c5a2e1723e3c7e4d1b3f3db7cbec6e61 by Abseil Team <absl-team@google.com>:

Mark Cord::Clear() with the ABSL_ATTRIBUTE_REINITIALIZES attribute.

This prevents false positives in the clang-tidy check bugprone-use-after-move; it allows Clear() to be called on a moved-from Cord without any warnings, and the Cord will thereafter be regarded as initialized again.

PiperOrigin-RevId: 412082757

--
a730d3f4ba06b55ae50386920a0544592069ac01 by Abseil Team <absl-team@google.com>:

StrJoin: Support iterators that do not have an `operator->`

Allows using `StrJoin` with iterators that do not have an `operator->`.
The `operator->` requirement for input iterators was dropped in C++20.

PiperOrigin-RevId: 412066130

--
6773c0ced2caa6a7855898298faecc584f3997ec by Andy Soffer <asoffer@google.com>:

Rollback of internal hook for keeping flags in sync with global state.

PiperOrigin-RevId: 411895027

--
4e7016a2fb88ce97853ef85ad5b4f76998eacca1 by Matt Kulukundis <kfm@google.com>:

Add an internal hook to allow keeping flags in sync with global state.

PiperOrigin-RevId: 411867376

--
2a7d4056e467b6b5d8a7aa9398d6cb5454c10fc5 by Martijn Vels <mvels@google.com>:

Internal change

PiperOrigin-RevId: 411806932
GitOrigin-RevId: a9ea60e9c0ccd744b6f12fd021dbedfe826dfe84
Change-Id: Ib35bb7b40774979ed2ad205bbb1744b1085eae78
2021-11-30 11:44:51 -05:00
Abseil Team
12bc53e031 Export of internal Abseil changes
--
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
2019-12-12 15:37:13 -05:00
nik7273
38b704384c Changed HTTP URLs to HTTPS where possible (#270) 2019-03-08 10:27:53 -05:00
Abseil Team
febc5ee6a9 Export of internal Abseil changes.
--
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
2019-03-06 14:49:15 -05:00
Abseil Team
bed5bd6e18 Export of internal Abseil changes.
--
f4bb8afa9376b4120f56f3beff7b07260da4a5c2 by CJ Johnson <johnsoncj@google.com>:

Add user to Github list

PiperOrigin-RevId: 209630262
GitOrigin-RevId: f4bb8afa9376b4120f56f3beff7b07260da4a5c2
Change-Id: I3fedf35011d805ee4a20b92e073b43523b47d15b
2018-08-22 11:02:33 -04:00
Abseil Team
cd95e71df6 - e63f59e34d34d483f89e4e6a7fe80805d1332329 This CL replicates github.com/abseil/abseil-cpp/pull/117 ... by Abseil Team <absl-team@google.com>
- 8444789eefc1f20c0102041ee52ad841131dcf93 Import of CCTZ from Github. by Abseil Team <absl-team@google.com>
  - 847bf3389edff542cdfcc4fcfb5b1d7466a5d297 Suggest using MakeSpan rather than the explicit mutable r... by Abseil Team <absl-team@google.com>
  - b6f130c12a3b2e8ea14e848df523f3ca8d360d25 ABSL_ARRAYSIZE is now declared and documented more clearl... by Matt Armstrong <marmstrong@google.com>
  - 8243bbcd7398e0cc1fed405b3c7cecc54fe77145 Don't dereference the begin() iterator of an empty string. by Derek Mauro <dmauro@google.com>
  - be817477eb17964a0f4c2a943c8281763ee269b0 Revert rename THREAD_ANNOTATION_ATTRIBUTE__ by Abseil Team <absl-team@google.com>
  - 940d4657f63acd7ff61d986558b0a38fa545a1fe Don't create '".text"' section when '.text' was intended. by Abseil Team <absl-team@google.com>
  - f6680d634b66537acec18121fbdca7c9083877b1 Rename THREAD_ANNOTATION_ATTRIBUTE__ by Abseil Team <absl-team@google.com>

GitOrigin-RevId: e63f59e34d34d483f89e4e6a7fe80805d1332329
Change-Id: If6f2286d6cbfd7b822e83c6cc28fa3e752bb41a4
2018-05-09 17:08:36 -04:00
Abseil Team
ff70456473 Changes imported from Abseil "staging" branch:
- 20f4e7133d695e9a05e13ebdfd4d78da310b42b5 Remove the warning supressions -Wno-documentation and by Derek Mauro <dmauro@google.com>
  - e1bde85c0571673b1e7a88b9d45a393606ba7e6c Changed the optimized version of strings_internal::JoinAl... by Abseil Team <absl-team@google.com>
  - 746e6716b4c15be61547670d68d25a1c850d3954 Add missing absl:: qualification. by Alex Strelnikov <strel@google.com>
  - 4e5c18c488cbd49ca72b02911cf22d830d5a7f16 Internals change: Remove the ability to pass a custom met... by Greg Falcon <gfalcon@google.com>
  - 65d58107a5730d4b6468bbffc72bea2f980af826 Moved most common character case (ascii printable) out of... by Abseil Team <absl-team@google.com>
  - f031331cc55a3d57b9110e12c7cbe50ac3e2a04f Add missing copyright headers to a few source files. by Greg Falcon <gfalcon@google.com>
  - 6035a77af6fa951c536b42df4c710d16d1817aec Enable libstdc++'s memcmp optimization in absl::equal for... by Abseil Team <absl-team@google.com>
  - 73a665a4a10781e5d89f75a876ece7ad859f4116 Fix minor spelling error "hexidecimal". by Abseil Team <absl-team@google.com>

GitOrigin-RevId: 20f4e7133d695e9a05e13ebdfd4d78da310b42b5
Change-Id: Id8c18ebd331d096935052a6ab259ebe0e2ef13ae
2017-12-20 17:03:18 -05:00
misterg
c2e7548296 Initial Commit 2017-09-19 16:54:40 -04:00