Commit Graph

72 Commits

Author SHA1 Message Date
Abseil Team
95619d531e Remove more lingering C++17 type traits polyfill usages
This will let us deprecate the declarations without triggering warnings in Abseil itself.

PiperOrigin-RevId: 895480358
Change-Id: I2e15877c15ed83f48ddb68cc73344c14b533bc68
2026-04-06 13:44:35 -07:00
Abseil Team
ed2114e8ff Stop using C++17 type traits polyfills
This will let us deprecate the declarations without triggering warnings in Abseil itself.

PiperOrigin-RevId: 894202105
Change-Id: I57bb2a1647be1fedf9b724a07042fd0f564ce074
2026-04-03 12:34:35 -07:00
Alexandre Vassalotti
747f9c9fd2 Mark Abseil container algorithms as constexpr for C++20.
This conditionally applies `constexpr` to the applicable container-based versions of the <algorithm> functions defined in "absl/algorithm/container.h" when building with C++20 or later.

PiperOrigin-RevId: 800165245
Change-Id: Ie2d0b16b2af84c3abd448ca15306e861d5e6c773
2025-08-27 14:03:53 -07:00
Derek Mauro
f363711b40 Remove unused include
PiperOrigin-RevId: 796888262
Change-Id: I3975b0d68d06beeb6c1d118653708418f8893046
2025-08-19 08:37:49 -07:00
Abseil Team
878361312d Automated Code Change
PiperOrigin-RevId: 783054860
Change-Id: I3f84881642f2f77be5d5275983243edf6305178c
2025-07-14 15:00:34 -07:00
Abseil Team
3eb2041985 Avoid requiring default-constructability of iterator type in algorithms that use ContainerIterPairType
This includes absl::c_minmax_element, absl::c_equal_range, and absl::mismatch

PiperOrigin-RevId: 756846820
Change-Id: I39f612224a98947f5ef9e9b7e53320df0bd99ce7
2025-05-09 11:40:36 -07:00
Abseil Team
3a074281f3 Remove fallback code in absl/algorithm/container.h
The fallback code is dead code since C++14 is no longer supported.

PiperOrigin-RevId: 753219255
Change-Id: I79cf1d2c8678f066a4154e35f114b79a99fff90b
2025-04-30 10:23:12 -07:00
Laramie Leavitt
3870e283fb Use absl::InsecureBitGen in place of std::random_device in Abseil tests.
PiperOrigin-RevId: 750721356
Change-Id: I84e8a1c2a80335983e557270ef78b8b0b4f1e452
2025-04-23 14:16:54 -07:00
Derek Mauro
90a7ba66e8 Updates to CI to support newer versions of tools
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
2024-12-23 10:58:05 -08:00
Abseil Team
b67caffec1 Mention c_any_of in the function comment of absl::c_linear_search.
This should help readers who find `c_linear_search` but need the more general form and don't guess that it exists under this rather different name.

PiperOrigin-RevId: 698124511
Change-Id: I1dfd33707d3dfb2a98527f706b97c3327acc6e76
2024-11-19 13:24:33 -08:00
Abseil Team
fa588813c4 Make c_find_first_of's options parameter a const reference to allow temporaries.
`c_find_first_of` does not keep or return references into `options` so there's no reason to require an l-value there.

PiperOrigin-RevId: 690696332
Change-Id: Ibbabb69ba72e9506c0406f2124034a944d6899d6
2024-10-28 11:53:04 -07:00
Abseil Team
67d126083c Add absl:: namespace to c_linear_search implementation in order to avoid ADL
PiperOrigin-RevId: 671868434
Change-Id: I3c6a5f545fd7535ea20485547cdc3680a2362824
2024-09-06 13:15:19 -07:00
Abseil Team
00478de3e9 Mark non-modifying container algorithms as constexpr for C++20.
This change marks Abseil's non-modifying sequence operations including
absl::linear_search and absl::c_linear_search as constexpr when building with
C++20.
PiperOrigin-RevId: 659812405
Change-Id: I8dc2cee873f30531b2eb8fb3da12085505a43a1a
2024-08-05 22:55:39 -07:00
Abseil Team
074a32af66 Mark c_min_element, c_max_element, and c_minmax_element as constexpr in C++17.
This allows them to be used in constant expressions, such as static_asserts.

PiperOrigin-RevId: 649292841
Change-Id: I76e31a94b933fa357276fee534b81c00c28c8b23
2024-07-03 22:08:39 -07:00
Abseil Team
37ebde53cf Make c_begin, c_end, and c_distance conditionally constexpr.
This allows them to be used in constexpr expressions, such as the following:

```
constexpr int distance = absl::c_distance(std::array<int, 3>());
```

Requires at least C++17 to be constexpr.

PiperOrigin-RevId: 648435141
Change-Id: I8136e351a6dc4c25f06ef895fb449f4f11048480
2024-07-01 11:34:46 -07:00
Abseil Team
63d4b2fe1e Add c_contains() and c_contains_subrange() to absl/algorithm/container.h.
These functions are based on the C++23's `std::ranges::contains()` and `std::ranges::contains_subrange()` functions, see: https://en.cppreference.com/w/cpp/algorithm/ranges/contains

PiperOrigin-RevId: 647084955
Change-Id: If5a01784e3cf1cc4d88e7f2fef92a3701fafc886
2024-06-26 14:46:45 -07:00
Derek Mauro
c025a934b1 Fix missing #include <random> for std::uniform_int_distribution
Fixes #1676

PiperOrigin-RevId: 635840902
Change-Id: Ifc4099175f1c5f040f55a9f5a47fe0c996af79d1
2024-05-21 09:58:29 -07:00
Eric Astor
258e5a1575 Add a container-based version of std::sample()
PiperOrigin-RevId: 592864147
Change-Id: I83179b0225aa446ae0b57b46b604af14f1fa14df
2023-12-21 08:12:11 -08:00
Dmitri Gribenko
55621d1af5 Add nullability annotations
PiperOrigin-RevId: 589842893
Change-Id: I9657761d1f71c665582406f278c6605f6d382f6d
2023-12-11 09:07:59 -08:00
Derek Mauro
a0b72adc35 Use STL algorithms available since C++14 to implement container
algorithms (when possible).

Prior to C++14, many STL container algorithms required size checks
because because the second container only used one iterator as an
input. This is not an issue for some algorithms since C++14 added
two iterator versions.

PiperOrigin-RevId: 575296640
Change-Id: I9e4fc8c75cba7cdb0cde10bdd7c5c75e07f414ae
2023-10-20 12:56:15 -07:00
Derek Mauro
b5fb0582b5 Use STL algorithms available since C++14 to implement absl::equal and
absl::rotate.

Prior to C++14 these were either polyfills or fixes for bugs in
standard libraries.

PiperOrigin-RevId: 575295101
Change-Id: Ie01e77fedadc879c73203d71babd40c87a419af3
2023-10-20 12:49:46 -07:00
Derek Mauro
0ef3ef4329 Bazel: Enable the header_modules feature
PiperOrigin-RevId: 572575394
Change-Id: Ic1c5ac2423b1634e50c43bad6daa14e82a8f3e2c
2023-10-11 07:58:06 -07:00
Derek Mauro
143e983739 Bazel: Support layering_check and parse_headers
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
2023-10-10 13:30:24 -07:00
Abseil Team
aac30f6d2c Fix typo in docstring for absl::c_iota()
PiperOrigin-RevId: 571418371
Change-Id: Ie650a4e8c7a9fbb022b1d27e6800765b59fcfc0c
2023-10-06 13:20:11 -07:00
Abseil Team
1a38beaaaf Add const qualifier to c_binary_search Sequence.
PiperOrigin-RevId: 506151912
Change-Id: I388884b0bd80ef0f8a0b3d3c7d0e1b404ddfb742
2023-01-31 16:37:53 -08:00
Abseil Team
b8720b4533 Use const references in Standard Library algorithms range adapters where possible.
Const references enforce stronger constraints and are consistent with the standard library signature. There should be no performance loss.

PiperOrigin-RevId: 504043141
Change-Id: I6c4b017665a462fc04e16f425d330fce2c3da227
2023-01-23 11:52:04 -08:00
Abseil Team
a09d210567 container.h: fix incorrect comments about the location of <numeric> algorithms.
PiperOrigin-RevId: 490228223
Change-Id: Iec5af16531132a903aaa3e584dd87b03feb2c0c7
2022-11-22 06:37:24 -08:00
Abseil Team
2594f85514 Fix "unsafe narrowing" warnings in absl, 10/n.
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 tests.)

Bug: chromium:1292951
PiperOrigin-RevId: 473055916
Change-Id: I40cdd6c87ba9d0a5fb2db5746cff04f14ee829c2
2022-09-08 12:28:51 -07:00
Derek Mauro
60499cf45c Convert algorithm and container benchmarks to cc_binary
PiperOrigin-RevId: 472521745
Change-Id: Ia76cd720d1036dce05f6332f41a2ff748b3ea971
2022-09-06 12:03:05 -07:00
Derek Mauro
10ec11de9c algorithm_test: suppress bogus -Wnonnull warning in GCC 12
Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105705

PiperOrigin-RevId: 454937873
Change-Id: I44f940caf36d83714af765f01cc43c5143fe21c3
2022-06-14 13:11:39 -07:00
Abseil Team
299f59cadd Export of internal Abseil changes
--
2130ba98c8359b08d97fb16d84dfd05687005dcf by Abseil Team <absl-team@google.com>:

Tweaking the documentation of c_all_of to state the effect more directly.

PiperOrigin-RevId: 410557900

--
4732289bf4b56123fed113e36be4710b55c6a6c7 by Greg Falcon <gfalcon@google.com>:

Improve the quality of absl::Hash<std::vector<bool>>.

This previously dispatched to std::hash<vector<bool>>, which suffers from trivial collisions on many platforms.  (They often hash the internal words but no size info, so that, e.g., {1, 1} and {1, 1, 0} collide.)

Also extended the unit test to exercise this.

PiperOrigin-RevId: 410329943

--
1c5f3934230a7669f74c96b305251786a265e235 by Greg Falcon <gfalcon@google.com>:

Add broader testing of absl hash contracts in the hash unit test.

In particular, test that the hash erasure mechanism works.

PiperOrigin-RevId: 410312738

--
5e1923f527ed3d02f6752a5b38d5e1c17a4a146f by Derek Mauro <dmauro@google.com>:

Internal change

PiperOrigin-RevId: 410290663

--
8c74bc962b3b98a5908017c345efc592393048ea by Martijn Vels <mvels@google.com>:

Add Cord::CreateFlat() function

PiperOrigin-RevId: 410260776

--
bd0de4e94c85620d3b8dd60fae367b730fc4cb34 by Evan Brown <ezb@google.com>:

Rename node_hash_policy to node_slot_policy.

Motivation: we can potentially reuse this code for node_btree_*.
PiperOrigin-RevId: 410082271
GitOrigin-RevId: 2130ba98c8359b08d97fb16d84dfd05687005dcf
Change-Id: Ie052084cf992dee250d8b2f388d39c4de0dcff40
2021-11-17 22:50:31 -05:00
Vertexwahn
22f482f0fc Remove bazelbuild/rules_cc dependency (#1038) 2021-10-14 13:01:52 -04:00
Abseil Team
89c531c1e0 Export of internal Abseil changes
--
e1a0989213908927f05002ab7697955ad7dc5632 by Martijn Vels <mvels@google.com>:

Introduce CordRepBtreeReader

CordRepBtreeReader provides forward navigation on cord btrees with absolute positional (offset) context, iterating over btree data in absl::string_view chunks.

PiperOrigin-RevId: 387585161

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

Internal change

PiperOrigin-RevId: 387577465

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

This change adds debug-build enforcement that the inputs to
absl::c_set_intersection are sorted, which is a prerequisite of
std::set_intersection and required for correct operation of the
algorithm.

PiperOrigin-RevId: 387446657

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

Change BadStatusOrAccess::what() to contain status_.ToString()

This ensures that on uncaught exception propagation that would cause program termination, the message contains information on the error which caused the failure.

Lazy initialization of what_ is a value judgement: if most callers are expected to call status() not what(), lazy initialization is correct. If most callers are expected to call what(), it should be initialized on construction to avoid atomic operation overhead.

PiperOrigin-RevId: 387402243

--
3e855084e104dc972a0c4385395e6d8e8465127f by Gennadiy Rozental <rogeeff@google.com>:

LSC: Standardize access to GoogleTest flags on GTEST_FLAG_GET/GTEST_FLAG_SET

This change is necessary to move Googletest flags out of the testing:: namespace without breaking code. These new macros will continue to be required for code that needs to work both inside Google's monorepo and outside in OSS, but can be used anywhere inside the monorepo.

PiperOrigin-RevId: 387396025

--
1ccf5895a15059ef689af5c4817d7b84f73190be by Gennadiy Rozental <rogeeff@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 387388496
GitOrigin-RevId: e1a0989213908927f05002ab7697955ad7dc5632
Change-Id: I3606d9ce29d909a3555e662e9df564202cf5068d
2021-07-29 14:17:36 -04:00
Florin Crișan
8f92175783 CMake: add option to use Google Test already installed on system (#969)
As of this change, you can use `-DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON` to have Abseil use the standard CMake find_package(GTest) mechanism.
2021-06-09 19:26:40 -04:00
Abseil Team
1ae9b71c47 Export of internal Abseil changes
--
ac1df60490c9583e475e22de7adfc40023196fbf by Martijn Vels <mvels@google.com>:

Change Cord constructor(string_view) to explicit make_tree and Cordz tracking

This CL changes the ctor to use an easier to maintain model where Cord code explicitly invokes Cordz update or new / tree logic, which avoids the ambiguity of the 'branched' InlineRep::set_tree code. This removes the need to equip InlineRep with 'MethodIdentifier' or other necessary call info, and also is a cleaner model: InlineRep is carrying too much code now that should plainly sit in Cord, especially with all internal abstractions having moved to InlineData.

See child CL(s) for desired state

PiperOrigin-RevId: 369433619

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

Rename the 'Compare' template type to 'LessThan', as the passed-in function is expected to act like operator<. It is worth avoiding confusion with std::compare, which returns an int (-1/0/1), as due to implicit casting this can lead to hard-to-spot bugs.

PiperOrigin-RevId: 369391118

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

Integrate CordzUpdateTracker into CordzInfo

PiperOrigin-RevId: 369348824

--
771d81ed357496c117179e1daec76eba5155932d by Martijn Vels <mvels@google.com>:

Replace mutex() with Lock() / Unlock() function

Mini design future tracking of CordzInfo sampled cords: CordzInfo holds a CordRep* reference without a reference count. Cord is responsible for synchronizing updates for sampled cords such that the CordRep* contained in CordzInfo is at all times valid. This is done by scoping Lock() and Unlock() calls around the code modifying the code of a sampled cord. For example (using the future CL CordzUpdateScope()):

CordzInfo* cordz_info = get_cordz_info();
CordzUpdateScope scope(cordz_info, CordzUpdateTracker::kRemovePrefix);
CordRep* rep = RemovePrefixImpl(root);
set_tree(rep);
if (cordz_info) {
  cordz_info->SetCordRep(rep);
}

On CordzInfo::Unlock(), if the internal rep is null, the cord is no longer sampled, and CordzInfo will be deleted. Thus any update resulting in the Cord being inlined will automatically no longer be sampled.

PiperOrigin-RevId: 369338802

--
5563c12df04a1e965a03b50bdd032739c55c0706 by Martijn Vels <mvels@google.com>:

Add UpdateTracker to CordzStatistics

PiperOrigin-RevId: 369318178

--
6b4d8463722a3e55a3e8f6cb3741a41055e7f83e by Martijn Vels <mvels@google.com>:

Add kClear, kConstructor* and kUnknown values and fix typo

PiperOrigin-RevId: 369297163

--
041adcbc929789d6d53371a8236840fc350e1eeb by Derek Mauro <dmauro@google.com>:

Switch from malloc to operator new in pool_urbg.cc
so it can only fail by throwing/aborting

PiperOrigin-RevId: 369274087

--
5d97a5f43e3f2d02d0a5bbe586d93b5751812981 by Benjamin Barenblat <bbaren@google.com>:

Correct Thumb function bound computation in the symbolizer

On 32-bit ARM, all functions are aligned to multiples of two bytes, and
the lowest-order bit in a function’s address is ignored by the CPU when
computing branch targets. That bit is still present in instructions and
ELF symbol tables, though; it’s repurposed to indicate whether the
function contains ARM or Thumb code. If the symbolizer doesn’t ignore
that bit, it will believe Thumb functions have boundaries that are off
by one byte, so instruct the symbolizer to null out the lowest-order bit
after retrieving it from the symbol table.

PiperOrigin-RevId: 369254082

--
462bb307c6cc332c1e2c3adb5f0cad51804bf937 by Derek Mauro <dmauro@google.com>:

Add a check for malloc failure in pool_urbg.cc
GitHub #940

PiperOrigin-RevId: 369238100
GitOrigin-RevId: ac1df60490c9583e475e22de7adfc40023196fbf
Change-Id: Ic6ec91c62cd3a0031f6a75a43a83da959ece2d25
2021-04-20 08:45:46 -07:00
Abseil Team
c9894d1dc3 Export of internal Abseil changes
--
dce086fa6e045bed433c664f95a6581b7ffb2d98 by Abseil Team <absl-team@google.com>:

fix spelling error "fulfil" -> "fulfill"

PiperOrigin-RevId: 339898016

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

Clarify comments on variant::emplace

PiperOrigin-RevId: 339897241

--
0d02261a7a8b9c11e3a4e76dfedf4d95590e2419 by Derek Mauro <dmauro@google.com>:

Use thread_local for ThreadIdentity storage on Apple platforms
that support it

PiperOrigin-RevId: 339698124
GitOrigin-RevId: dce086fa6e045bed433c664f95a6581b7ffb2d98
Change-Id: I8c668b33c805fd5231ceb285652c80f312e5a33a
2020-10-30 15:43:07 -04:00
Abseil Team
4b2fbb4adb Export of internal Abseil changes
--
a5af5874c1c5cc02bd2a748d455321f82b6f2a93 by Andy Getzendanner <durandal@google.com>:

fix compile fails with asan and -Wredundant-decls

Import of https://github.com/abseil/abseil-cpp/pull/801

PiperOrigin-RevId: 336693223

--
ed9df42ab2b742386c6692c2bed015374c919d9c by Derek Mauro <dmauro@google.com>:

Fix integer conversion warning

Fixes #814

PiperOrigin-RevId: 336651814

--
0ab4c23884e72dce17b67c1eb520f9dbb802565d by Derek Mauro <dmauro@google.com>:

Internal change

PiperOrigin-RevId: 336585378

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

Add bitset operations to Futex helper.

PiperOrigin-RevId: 336409368

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

Fix code indentation in a comment.

PiperOrigin-RevId: 336368167

--
bc3961c87a7e7760c10319a5b0349c279f7ae3ad by Samuel Benzaquen <sbenza@google.com>:

Improve performance of the registry:
 - Reduce contention
 - Reduce memory usage for each flag by `6*sizeof(void*)`.
 - Replace one immortal allocation per-flag with a single one for all the flags
 - Slightly improve single-threaded performance by avoiding the std::map indirections.

PiperOrigin-RevId: 336365904

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

Fix typo in comment on absl::Condition.

PiperOrigin-RevId: 336311680

--
b5b808a8c75ca0df7b09eff9a423ec171d80f771 by Derek Mauro <dmauro@google.com>:

Add missing Apache license headers

PiperOrigin-RevId: 336294980

--
89446c3a4793df8b95060385cf3e219357c3db1d by Andy Soffer <asoffer@google.com>:

Internal changes

PiperOrigin-RevId: 336287465

--
57c8be4e294881bc79a6a44b8e4bf7ecbb19b9b9 by Matt Kulukundis <kfm@google.com>:

Extract Futex from an implementation detail of Wait to a private interface.

PiperOrigin-RevId: 336123209
GitOrigin-RevId: a5af5874c1c5cc02bd2a748d455321f82b6f2a93
Change-Id: Ie5a0ebe28e571814e3e11d4c05ca308523ccf311
2020-10-12 13:39:27 -04:00
Abseil Team
e63a5a6104 Export of internal Abseil changes
--
430bda42820b619b346201bc42769d014228e825 by Gennadiy Rozental <rogeeff@google.com>:

Update version for CMake and Bazel

PiperOrigin-RevId: 336089889

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

changes how non-equality is evaluated

absl::c_mismatch is based on std::mismatch, which requires that its
iterators' reference types meet the requirements of
Cpp17EqualityComparable[1]. The previous CL mistakenly wrote
absl::c_mismatch using `*first1 != *first2` which assumes that the
reference types model std::equality_comparable[2] (which was only added
in C++20).

This CL reverts that behaviour.

[0]: http://wg21.link/mismatch
[1]: http://wg21.link/utility.arg.requirements#tab:cpp17.equalitycomparable
[2]: http://wg21.link/concept.equalitycomparable

PiperOrigin-RevId: 335897465

--
7cb902f079838081a15f8b72e0cef46beab653f2 by Derek Mauro <dmauro@google.com>:

Disable a raw_hash_map_allocator.cc test that doesn't build
due to a noexcept bug in gcc 5.4 and 5.5

PiperOrigin-RevId: 335876843
GitOrigin-RevId: 430bda42820b619b346201bc42769d014228e825
Change-Id: I94d5b8e03e0a91d81923aa831f6f63c625e0b836
2020-10-08 11:34:42 -04:00
Abseil Team
4b4f9aae75 Export of internal Abseil changes
--
6e808cee774d9f4fd315da432e39442ebb738429 by Abseil Team <absl-team@google.com>:

Fix a couple of typos.

PiperOrigin-RevId: 335422012
GitOrigin-RevId: 6e808cee774d9f4fd315da432e39442ebb738429
Change-Id: I8deec4caa0b5e1219d758ba1a2d7b138b9915ed4
2020-10-06 10:49:50 -04:00
Abseil Team
887d0eee6b Export of internal Abseil changes
--
d6e582e21ceec768aa72e857c10ba80cad2f2202 by Abseil Team <absl-team@google.com>:

adds bounds-checking for the second range in absl::c_mismatch

The API for the two-range absl::c_mismatch is misleading as it
doesn't check the bounds of the second range against the first one.
This commit cleans up the internals of the overload to make sure that
buggy calls are not exploitable; non-buggy calls are unaffected.

This is consistent with both C++14's two-range std::mismatch and
C++20's std::ranges::mismatch (see http://wg21.link/mismatch).

PiperOrigin-RevId: 335050236
GitOrigin-RevId: d6e582e21ceec768aa72e857c10ba80cad2f2202
Change-Id: I77e0d030adf35c09069ceab5ea67efdf09377390
2020-10-02 22:03:20 -04:00
Abseil Team
093cc27604 Export of internal Abseil changes
--
0674e1ab1c1f71c5362b9e2337333e67f7ed865d by Andy Getzendanner <durandal@google.com>:

btree: fix sign-compare warnings

Import of https://github.com/abseil/abseil-cpp/pull/800

PiperOrigin-RevId: 334668397

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

Avoid iterating past the end of either container in absl::c_transform.

The API for the two-range absl::c_transform is misleading as it
doesn't check the bounds of the second range against the first one.
This commit cleans up the internals of the overload to make sure that
buggy calls are not exploitable; non-buggy calls are unaffected.

This is consistent with C++20 ranges (see
http://wg21.link/alg.transform).

PiperOrigin-RevId: 334629614

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

Avoid iterating past the end of either container in absl::c_swap_ranges.

The API for absl::c_swap_ranges is misleading as it doesn't check the
bounds of the second range against the first one. This commit cleans
up the internals of the overload to make sure that buggy calls are not
exploitable; non-buggy calls are unaffected.

This is consistent with C++20 ranges (see http://wg21.link/alg.swap).

PiperOrigin-RevId: 334618454
GitOrigin-RevId: 0674e1ab1c1f71c5362b9e2337333e67f7ed865d
Change-Id: Ifac0e99b1209bb7589bf74215b1d354dd30eabaa
2020-10-01 01:43:11 +00:00
Abseil Team
fbf0fdab62 Export of internal Abseil changes
--
9f746b79e16d36dba908ed9e2a586d890fe54acc by Derek Mauro <dmauro@google.com>:

Remove the Bazel mirror URL that we use in our WORKSPACE file

This doesn't appear to be supported. We use --distdir caching in our tests.

PiperOrigin-RevId: 327634738

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

Removing comments following license() rules as they are rarely useful, redundant with LICENSE files, and tend to fall out of date.

PiperOrigin-RevId: 327504063

--
b59c076638a57a74a3f8475f1dee8b536e32a15f by Gennadiy Rozental <rogeeff@google.com>:

Change GetAllFlags API to return a collection of mutable flag handles.

This will make this interface on par with FindCommandLineFlag and allow to call
CommandLineFlag::ParseFrom on the handle returned by GetAllFlags.
PiperOrigin-RevId: 327499084

--
bbf56b3c4a1d908d95e5a52aba38b1984151efff by Gennadiy Rozental <rogeeff@google.com>:

Make raw_hash_set compile when AllocTraits::propagate_on_container_swap is false.

PiperOrigin-RevId: 327371107

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

On macOS, `mem_alloc` is defined like this:

rpc/types.h:86:#define mem_alloc(bsize)	calloc(1, bsize)

So if that file is included before container_memory.h, the variable mem_alloc
may never get defined. This is fixed by using a different name.

PiperOrigin-RevId: 327360224

--
aa8f5528382c0d01239ce75b645723aaf7e1ef46 by Gennadiy Rozental <rogeeff@google.com>:

Release of absl::GetAllFlags API.

PiperOrigin-RevId: 327275943
GitOrigin-RevId: 9f746b79e16d36dba908ed9e2a586d890fe54acc
Change-Id: I99c5c87dd1712bf8df9a52397b0c1e400a3c3447
2020-08-20 15:09:31 -04:00
Abseil Team
da3a87690c Export of internal Abseil changes
--
b2b94b9f533e4f9ae2a2df9de56ccb3b18f31d0d by Gennadiy Rozental <rogeeff@google.com>:

Internal change

PiperOrigin-RevId: 314366138

--
7a5ac6be82741aec5b327d7b67efd14d69deed6a by Gennadiy Rozental <rogeeff@google.com>:

Introduce Abseil prefixed dynamic annotation macros.

PiperOrigin-RevId: 314228914

--
33e7c605cb1be9bd48bd3590b1eedccd68d3bd1b by Gennadiy Rozental <rogeeff@google.com>:

Fixing missing includes and remove unnecessary ones.

PiperOrigin-RevId: 314217909

--
6a3c5c26bfa13317bf0a880f13d0e4be0b971b76 by Gennadiy Rozental <rogeeff@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 314209576

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

absl::FormatTime() and absl::ParseTime() format specifiers:
- %EZ now accepts 'z' in addition to 'Z' as a synonym for +00:00.
- %ET is introduced, producing 'T' on output, and accepting 'T'
  or 't' on input.  This is for the RFC3339 date-time separator.

PiperOrigin-RevId: 313945137

--
87c437ce3aab3f59a7546e44a28cd1c8aaa152c3 by Laramie Leavitt <lar@google.com>:

Rollback

PiperOrigin-RevId: 313868206

--
8049b74349486a0026932b86d29c380b195e1cba by Laramie Leavitt <lar@google.com>:

Remove the MockingBitGenBase base class in favor of type-erasure in BitGenRef.

In Abseil random, mocking was split across two different classes,
MockingBitGenBase and MockingBitGen. This split existed because Google Mock is a
test-only library that we don't link into production, so MockingBitGenBase
provided a low-overhead scaffold used to lookup mocks when in test code, but
which is unused in production code.

That has been replaced by type-erasure which looks for a method named
CallImpl with the correct signature.

Weaken the coupling between MockingBitGen, DistributionCaller, and MockOverloadSet.

Rename CallImpl to InvokeMock()

Previously, the implementation of DistributionCaller was also split across different files using explicit instantiation of the DistributionCaller struct and some details in the Mocking classes. Now Distribution caller uses the presence of the InvokeMock() method to choose whether to use the mockable call path or the default call path.

PiperOrigin-RevId: 313848695

--
1741d80e08050e1939605f70ca6ff64809785c85 by Gennadiy Rozental <rogeeff@google.com>:

Introduce public interface to access reflection handle corresponding the flag.

This interface will be the only official way to access flag reflection information from the flag object. The other internal methods will eventually disappear.

PiperOrigin-RevId: 313734006

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

Improve documentation of absl::c_partial_sort_copy.

This function takes no middle parameter, instead using the size of the result
container to determine the size of the partial sort.

PiperOrigin-RevId: 313656062

--
bbc759d43656b1b996ad558f23c852a9f14129d2 by Gennadiy Rozental <rogeeff@google.com>:

Eliminate dynamic annotation symbols in the library.

PiperOrigin-RevId: 313650817
GitOrigin-RevId: b2b94b9f533e4f9ae2a2df9de56ccb3b18f31d0d
Change-Id: Ic7a11bbcb723f3ff6a7e2f214bff0a92c6f8ab4d
2020-06-02 14:26:36 -04:00
Abseil Team
d43b7997c0 Export of internal Abseil changes
--
7a9e8d95f795be037aa2dce4e44809ad0166aaec by Samuel Benzaquen <sbenza@google.com>:

Make end() iterator be nullptr.
This makes the creation of and comparison with end() smaller and faster. `find()!=end()` becomes leaner.

PiperOrigin-RevId: 304681605

--
8f3024979446b391b79b1b60ada7d00a504d6aa6 by Derek Mauro <dmauro@google.com>:

Fix Bazel's distdir detection and prefer double brackets (bash recommendation)

PiperOrigin-RevId: 304615725

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

Internal change

PiperOrigin-RevId: 304570545

--
2bbfa5bda52057e1938a96c286ad33ff64e535e0 by Gennadiy Rozental <rogeeff@google.com>:

Implement general storage case as aligned buffer.

Aside from eliminating dynamic memory allocation for flag storage, we also saving 11 bytes per int flag, 15 bytes per double and string flag.

PiperOrigin-RevId: 304511965

--
9e1aed2a95d7d060f8b906fe8c67fc3ba537b521 by Derek Mauro <dmauro@google.com>:

Use reserve to make a bad_alloc less likely in endian_test

This happened once and shouldn't have happened, so it was probably
just a flake, but might as well make this change.

PiperOrigin-RevId: 304505572

--
c2faf22ba2d4d66753390e6959494214895581f0 by Gennadiy Rozental <rogeeff@google.com>:

Use anonymous bit fields to enforce separation between const and mutable bit fields.

We also move init_control field (which is now safe) to save 8 bytes per flag (based on size_tester output)

PiperOrigin-RevId: 304505215

--
7ec51250a84bb03e826b3caad64431e91748186a by Krzysztof Kosiński <krzysio@google.com>:

Change the buffer size in AppendNumberUnit to constexpr.

PiperOrigin-RevId: 304492779

--
a6c8db1be4f421ea7b7c02f7a01b4f48bad61883 by Gennadiy Rozental <rogeeff@google.com>:

Add test cases for two word storage.

Some additional tests were added for other storage kinds as well. These came about after I started to look into a coverage output and noticed that some cases (like reading flag values via reflection) were not covered by this test at all. It does not make sense to just add tests for two word values, so I've covered other storage kinds as well.

PiperOrigin-RevId: 304432511

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

Internal change

PiperOrigin-RevId: 304254681

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

Internal change

PiperOrigin-RevId: 304250274
GitOrigin-RevId: 7a9e8d95f795be037aa2dce4e44809ad0166aaec
Change-Id: I01623de87355bec5cf87cc5932a1ca44cade9aae
2020-04-04 17:08:50 -04: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
Abseil Team
a4b757b5d4 Export of internal Abseil changes
--
693f81830b9f9cc8b24a1f38492b8dfcdd1d0e24 by Abseil Team <absl-team@google.com>:

Check that absl::int128 works as a std::chrono::duration::rep.

In particular, validate that ...
  std::chrono::time_point<std::chrono::system_clock,
                          std::chrono::duration<absl::int128,
                                                std::atto>>
is a superset (range and resolution) of absl::Time.

PiperOrigin-RevId: 283370280

--
df6073b686bd44223c6f9070fcceec918c728871 by Gennadiy Rozental <rogeeff@google.com>:

Changes thread annotations to use DataGuard() function instead of a specific Mutex.
Remove unused declaration of InvokeCallback.

PiperOrigin-RevId: 283361188

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

Rewrite GetNominalCPUFrequency to use advapi32 instead of shlwapi

Using shlwapi.dll means that gdi32.dll is loaded which then makes process destruction more expensive, which is unacceptable for some uses. There may be other places that pull in gdi32.dll - this just fixes the one.

PiperOrigin-RevId: 282960698

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

Small typo fix in comments: initiazliation -> initialization

PiperOrigin-RevId: 282891800

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

Update c_find_first_of() comment to remove the mention of an ordered container.

PiperOrigin-RevId: 282836540

--
5fcabc0a834dff39a505d5a5fc5403ddeb96028e by Derek Mauro <dmauro@google.com>:

Fix NaCl build, where format checking is broken

PiperOrigin-RevId: 282826202

--
aaf9ad3274c056a2f68e9b8ccada45c9802e2f1e by Derek Mauro <dmauro@google.com>:

Fix more -Wundef warnings

PiperOrigin-RevId: 282799820

--
1fb06150a70ffe98bf4b2d42b2a39d083bf44f8c by Derek Mauro <dmauro@google.com>:

Release support for additional platforms

PiperOrigin-RevId: 282793384

--
fa947fc28624a316fa872d7045b3838b88a0d69b by Derek Mauro <dmauro@google.com>:

Cleanup inconsistent usage of __has_attribute

PiperOrigin-RevId: 282793296

--
990030ad282263d6303c83b780a55fdec8e90d43 by Gennadiy Rozental <rogeeff@google.com>:

Eliminate the pointer in absl::Flag, which points to n space where we were storing flag's default value. We also eliminate additional (now unnecessary) allocation for flag's default value.
Instead we'll initialize the flags value directly from the value specified in ABSL_FLAG.
If the default value is updated via the call to SetCommandLineOptionWithMode we are replacing pointer to initialization routine to pointer to new default value.

PiperOrigin-RevId: 282637616
GitOrigin-RevId: 693f81830b9f9cc8b24a1f38492b8dfcdd1d0e24
Change-Id: I6f2edd8ef844de09aa2c182a7ca3133a22364792
2019-12-02 15:53:43 -05:00
Abseil Team
3df7b52a6a Export of internal Abseil changes
--
3a871e2cd854a46770a9416189953b2b38980bcf by Andy Getzendanner <durandal@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 280660534

--
f5a155fb056dcf68b089c21aebb5bf5159dc0eb3 by Tom Manshreck <shreck@google.com>:

Nit: fix format of algorithm.h comments

PiperOrigin-RevId: 280474139

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

Allow absl::Notification::HasBeenNotified to be inlined.

PiperOrigin-RevId: 280453271

--
26d33dd2bad72945f1987f7b2669dbec3a6247e6 by Derek Mauro <dmauro@google.com>:

Fix unused variable warnings on Windows

PiperOrigin-RevId: 280324417

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

PeriodicSampler implementation (for internal-use only)

PiperOrigin-RevId: 280257168
GitOrigin-RevId: 3a871e2cd854a46770a9416189953b2b38980bcf
Change-Id: I6e2978cae22a6adc41c0577e5c21355e9db7c8f5
2019-11-15 11:16:16 -05:00
Abseil Team
ab3552a189 Export of internal Abseil changes
--
f13697e3d33803f9667d124072da4f6dd8bfbf85 by Andy Soffer <asoffer@google.com>:

Addressing https://github.com/abseil/abseil-cpp/issues/314, fixing
CMakeLists.txt to reference ABSL_TEST_COPTS rather than ABSL_DEFAULT_COPTS.

ABSL_TEST_COPTS should be preferred for all tests so that they are configured consistently (moreover, CMake should agree with Bazel).

PiperOrigin-RevId: 274932312

--
c31c24a1fa6bb98136adf51ef37c0818ac366690 by Derek Mauro <dmauro@google.com>:

Silence MSAN in the stack consumption test utility

PiperOrigin-RevId: 274912950

--
2412913c05a246cd527cd4c31452f126e9129f3a by CJ Johnson <johnsoncj@google.com>:

Internal change

PiperOrigin-RevId: 274847103

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

Reformat BUILD file to current standards.

PiperOrigin-RevId: 274815392

--
a2780e085f1df1e4ca2c814a58c893d1b78a1d9c by Samuel Benzaquen <sbenza@google.com>:

Fix invalid result regarding leading zeros in the exponent.

PiperOrigin-RevId: 274808017

--
dd402e1cb5c4ebacb576372ae24bf289d729d323 by Samuel Benzaquen <sbenza@google.com>:

Make string_view's relational operators constexpr when possible.

PiperOrigin-RevId: 274807873

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

Internal rework.

PiperOrigin-RevId: 274787159

--
70d81971c5914e6785b8e8a9d4f6eb2655dd62c0 by Gennadiy Rozental <rogeeff@google.com>:

Internal rework.

PiperOrigin-RevId: 274715557

--
14f5b0440e353b899cafaaa15b53e77f98f401af by Gennadiy Rozental <rogeeff@google.com>:

Make deprecated statements about ParseFLag/UnparseFlag consistent in a file.

PiperOrigin-RevId: 274668123

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

Allow absl::c_equal to be used with arrays.

This is achieved by allowing container size computation for arrays.

PiperOrigin-RevId: 274426830

--
219719f107226d328773e6cec99fb473f5d3119c by Gennadiy Rozental <rogeeff@google.com>:

Release correct extension interfaces to support usage of absl::Time and absl::Duration as ABSL_FLAG

PiperOrigin-RevId: 274273788

--
47a77f93fda23b69b4a6bdbd506fe643c69a5579 by Gennadiy Rozental <rogeeff@google.com>:

Rework of flags persistence/FlagSaver internals.

PiperOrigin-RevId: 274225213

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

Switch reference to sdkddkver.h to lowercase, matching conventions used in the Windows SDK and other uses. This helps to avoid confusion on case-sensitive filesystems.

PiperOrigin-RevId: 274061877

--
561304090087a19f1d10f0475f564fe132ebf06e by Andy Getzendanner <durandal@google.com>:

Fix ABSL_WAITER_MODE detection for mingw

Import of https://github.com/abseil/abseil-cpp/pull/342

PiperOrigin-RevId: 274030071

--
9b3caac2cf202b9d440dfa1b4ffd538ac4bf715b by Derek Mauro <dmauro@google.com>:

Support using Abseil with the musl libc implementation.

Only test changes were required:
  * Workaround for a bug in sigaltstack() on musl
  * printf-style pointer formatting (%p) is implementation defined,
    so verify StrFromat produces something compatible
  * Fix detection of feenableexcept()

PiperOrigin-RevId: 274011666

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

nvcc workaround: explicitly specify the definition of node_handle::Base

PiperOrigin-RevId: 274011392

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

Internal change

PiperOrigin-RevId: 273996318

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

Introduce a type alias to work around an nvcc bug.

On the previous code, nvcc gets confused thinking that T has to be a parameter
pack, as IsDecomposable accepts one.

PiperOrigin-RevId: 273980472

--
105b6e6339b77a32f4432de05f44cd3f9c436751 by Eric Fiselier <ericwf@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 273955589

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

Avoid dual-exporting scheduling_mode.h

PiperOrigin-RevId: 273825112

--
fbc37854776d295dae98fb9d06a541f296daab95 by Andy Getzendanner <durandal@google.com>:

Fix ABSL_HAVE_ALARM check on mingw

Import of https://github.com/abseil/abseil-cpp/pull/341

PiperOrigin-RevId: 273817839

--
6aedcd63a735b9133e143b043744ba0a25407f6f by Andy Soffer <asoffer@google.com>:

Remove bit_gen_view.h now that all callers have been migrated to bit_gen_ref.h
Tested:
TGP - https://test.corp.google.com/ui#id=OCL:273762409:BASE:273743370:1570639020744:3001bcb5

PiperOrigin-RevId: 273810331

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

Internal change.

PiperOrigin-RevId: 273589963

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

Update macro name for `ABSL_GUARDED_BY()` in the example section.

PiperOrigin-RevId: 273286983

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

Fix potential integer overflow in the absl time library.

In absl::FromTM, the tm.tm_year is added by 1900 regarding that tm.tm_year represents the years since 1900. This change checks integer overflow before doing the arithmetic operation.

PiperOrigin-RevId: 273092952

--
b41c2a1310086807be09a833099ae6d4009f037c by Gennadiy Rozental <rogeeff@google.com>:

Correctly Unlock the global mutex in case of concurrent flag initialization.

Fixes #386

PiperOrigin-RevId: 272979749

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

Try to become idle only when there is no wakeup.

Immediately after waking up (when futex wait returns), the current thread tries
to become idle doing bunch of memory loads and a branch.  Problem is that there
is a good chance that we woke up due to a wakeup, especially for actively used
threads.  For such wakeups, calling MaybeBecomeIdle() would be a waste of
cycles.

Instead, call MaybeBecomeIdle() only when we are sure there is no wakeup.  For
idle threads the net effect should be the same.  For active, threads this will
be more efficient.

Moreover, since MaybeBecomeIdle() is called before waiting on the futex, the
current thread will try to become idle before sleeping.  This should result
in more accurate idleness and more efficient release of thread resources.

PiperOrigin-RevId: 272940381
GitOrigin-RevId: f13697e3d33803f9667d124072da4f6dd8bfbf85
Change-Id: I36de05aec12595183725652dd362dfa58fb095d0
2019-10-16 10:42:51 -04:00
Yannic
36910d3d7e [bazel] Add fixes for --incompatible_load_cc_rules_from_bzl (#351)
* [bazel] Add fixes for --incompatible_load_cc_rules_from_bzl

Starting with Bazel 1.0 (September 2019), C++ rules will need to be
loaded from the @rules_cc repository. This change adds the required
loads for that. For full compatibility, we will need versions of
googletest and google-benchmark that also includes these loads.

* Run buildifier again after merge
2019-08-16 10:38:13 -04:00
Abseil Team
72e09a54d9 Export of internal Abseil changes.
--
2ee5dbb79b56539b580c3a36eec5a025d08b7022 by Eric Fiselier <ericwf@google.com>:

Unconditionally apply no-sanitize attributes.

We currently fail to apply the attributes in open-source
land because the build system doesn't define ADDRESS_SANITIZER
like we expect.

The attributes should have no effect when the sanitizers are
disabled.

PiperOrigin-RevId: 255024122

--
5a123175146de14d04013862aa378f28f8eff73c by CJ Johnson <johnsoncj@google.com>:

Updates the InputIterator-accepting member functions of InlinedVector to be cleaner/easier to read

PiperOrigin-RevId: 254994794

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

Added back c_move_backward which was previously deleted by mistake.

PiperOrigin-RevId: 254990809

--
bc427ca5f7fb88a70ba3a676bb9c7ff829c65ae9 by CJ Johnson <johnsoncj@google.com>:

Removes DestroyAndDeallocate() function from the internal details of InlinedVector because it ended up not being particularly useful

PiperOrigin-RevId: 254981201
GitOrigin-RevId: 2ee5dbb79b56539b580c3a36eec5a025d08b7022
Change-Id: I825c6c0a2fcf13ed6e60d71224037a57d7068d55
2019-06-25 16:21:15 -04:00