aboutsummaryrefslogtreecommitdiff
path: root/absl/types
Commit message (Collapse)AuthorAgeFilesLines
* Use ABSL_UNREACHABLE() instead of equivalentDerek Mauro2024-06-131-14/+1
| | | | | PiperOrigin-RevId: 643024432 Change-Id: Id07aa18d186291442f7b6f3c68ef8dd6cc20b434
* Add ABSL_INTERNAL_ATTRIBUTE_VIEW and ABSL_INTERNAL_ATTRIBUTE_OWNER ↵Abseil Team2024-06-121-1/+1
| | | | | | | attributes to types in Abseil PiperOrigin-RevId: 642619703 Change-Id: I8d2e423a3c7f40709d0e8c82cac0395c75d601cf
* Add internal traits to absl::Span for lifetimebound detectionAbseil Team2024-04-024-0/+8
| | | | | PiperOrigin-RevId: 621169753 Change-Id: Ib6d7b248e14f29f1f91c24b8e1cf9703962b0e36
* Replace usages of absl::move, absl::forward, and absl::exchange with theirDerek Mauro2024-03-115-136/+129
| | | | | | | std:: equivalents PiperOrigin-RevId: 614687225 Change-Id: I07421db08ee9c221e561f42e3bf8345fb5321401
* Span: Fixed comment referencing std::span as_writable_bytes() as ↵Abseil Team2024-02-081-1/+1
| | | | | | | as_mutable_bytes(). PiperOrigin-RevId: 605288522 Change-Id: Id16ad96b9323c71bd60801a6c8c359f7ff3d320e
* Remove code pieces for no longer supported GCC versions.Abseil Team2024-01-221-21/+1
| | | | | | | The minimum supported version today is GCC 7 (`__GNUC__ >= 7`). PiperOrigin-RevId: 600475215 Change-Id: I1aa46384f1e75f268649a48dbe2b42f3475bb07f
* Remove code pieces for no longer supported MSVC versions.Abseil Team2024-01-191-25/+2
| | | | | | | The current support policy is `_MSC_VER >= 1920`. PiperOrigin-RevId: 599833619 Change-Id: I9cf7393a5b659d1680765e37e0328539ccb870fa
* Avoid a empty library build failure on Apple platformsDerek Mauro2024-01-033-0/+54
| | | | | | | | | | | | | | | | | | | | | https://github.com/abseil/abseil-cpp/issues/1465 reports that some CMake builds on Apply platforms issue ``` warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: libabsl_bad_any_cast_impl.a the table of contents is empty (no object file members in the library define global symbols) ``` Our CMake build handles this problem for header-only libraries by not building a library at all. For some libraries, for example our polyfills, the library is only conditionally empty. In these libraries, I added a single char variable on Apple platforms as a workaround. I have been able to reproduce the warnings reported in https://github.com/abseil/abseil-cpp/issues/1465, but they don't fail the build for me. I don't see them any more after this change. PiperOrigin-RevId: 595480705 Change-Id: Ie48637e84ebae2f2aea4e2de83b146f30f6a76b9
* [absl] Rename `absl::internal::identity` to `absl::internal::type_identity`Lawrence Wolf-Sonkin2023-12-281-3/+3
| | | | | | | | * Also does this for `absl::internal::identity_t` which is now `absl::internal::type_identity_t` * This is clearer naming as this is a backfill of `std::type_identity` (the identity type), and not `std::identity` (the identity function) PiperOrigin-RevId: 594316002 Change-Id: I5fb8cf7e3d07c1bc736cbecd202e7d556b6ea33e
* Remove nullability from Span::{pointer,iterator}Sam McCall2023-12-151-2/+4
| | | | | | | | | | | | These are in some sense correct (begin()/end() can be null for empty spans), but don't capture the critical contract that begin() is only null when end() is. This leads to foreach loops over spans being considered unsafe. Long-term we may want to express such constraints somehow, but for now giving these pointers unknown nullability is the best we can do. PiperOrigin-RevId: 591191038 Change-Id: I1f02e068a445c0ca5996a9212477b64393ef4161
* Add nullability annotationsDmitri Gribenko2023-12-114-8/+16
| | | | | PiperOrigin-RevId: 589842893 Change-Id: I9657761d1f71c665582406f278c6605f6d382f6d
* Make `absl::{partial,weak,strong}_ordering` aliases for the `std::` orderingMarcin Kowalczyk2023-12-053-0/+26
| | | | | | | | | | | | types when they are available. This makes them interchangeable in contexts known to be compiled as C++20. This also makes `absl::` ordering types compatible with `<=>`, allowing to unconditionally use `absl::` spelling for types but conditionally use `<=>` when available. PiperOrigin-RevId: 588085408 Change-Id: I1aa5247f0e31acbb838ee76829b7a13c74b0a94f
* Remove `absl::weak_equality` and `absl::strong_equality`.Marcin Kowalczyk2023-12-042-221/+4
| | | | | | | | | | | | | | | | | | | | The corresponding `std` types were removed before C++20 was finalized: https://wg21.link/P1959R0. They are unused. The language mechanisms and recommendations changed since they were originally proposed. In particular: * An explicitly defaulted `operator==` is defined in terms of memberwise `operator==` rather than sibling `operator<=>`. * An `operator!=` can be implicitly added to an overload set in terms of `operator==` rather than `operator<=>`. * A class which has equality but not ordering defined should provide `operator==` rather than `operator<=>`. PiperOrigin-RevId: 587834267 Change-Id: I2c2513c13f3485b9edc6a345dca4a577d8e65167
* Bazel: Enable the header_modules featureDerek Mauro2023-10-111-0/+1
| | | | | PiperOrigin-RevId: 572575394 Change-Id: Ic1c5ac2423b1634e50c43bad6daa14e82a8f3e2c
* Bazel: Support layering_check and parse_headersDerek Mauro2023-10-101-1/+16
| | | | | | | | | | | | | 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
* Delete the experimental conformance testing code.Derek Mauro2023-08-2310-6062/+0
| | | | | | | This project was never completed. PiperOrigin-RevId: 559492534 Change-Id: Ie4e9661e25731418979ad10669ac946e1c4d60c2
* Migrate most RAW_LOGs and RAW_CHECKs in tests to regular LOG and CHECK.Andy Getzendanner2023-05-234-9/+8
| | | | | | | | | | | The non-RAW_ versions provide better output but weren't available when most of these tests were written. There are just a couple spots where RAW_ is actually needed, e.g. signal handlers and malloc hooks. Also fix a couple warnings in layout_test.cc newly surfaced because the optimizer understands CHECK_XX differently than INTERNAL_CHECK. PiperOrigin-RevId: 534584435 Change-Id: I8d36fa809ffdaae5a3813064bd602cb8611c1613
* Add lifetimebound attribute to some Abseil containersAbseil Team2023-05-032-14/+18
| | | | | PiperOrigin-RevId: 529119690 Change-Id: If585274c409e2a344c8d60759da6f8f990023d29
* Fix spelling mistakesVertexwahn2023-04-271-1/+1
|
* Fix some spelling mistakesVertexwahn2023-04-241-1/+1
|
* Optional: Remove workaround for lack of support for inheriting constructorsDerek Mauro2023-04-141-52/+0
| | | | | PiperOrigin-RevId: 524368346 Change-Id: I68b57a1abc8d805aa5cb4b45c5d7449ade231579
* Span: Remove MSVC 2015 workaroundDerek Mauro2023-04-141-2/+1
| | | | | PiperOrigin-RevId: 524347923 Change-Id: I4538eb8d5d6e8befbeb8ab992b0ad44dd8f4f00c
* Change OnlyLiteralZero to not trigger modernize-use-nullptrAbseil Team2023-04-011-6/+16
| | | | | PiperOrigin-RevId: 521133781 Change-Id: I1334ea683bc01ef9b1b9800d6681e29dd2a1ec55
* Merge pull request #1403 from AtariDreams:c++11Copybara-Service2023-02-224-26/+10
|\ | | | | | | | | PiperOrigin-RevId: 511539869 Change-Id: I32d5e91537b078691988e7e6d3244c682eb8d7d2
| * Resolve TODO: remove C++11 workaroundsRose2023-02-224-17/+4
|/ | | | We no longer support C++11 as per the Google C++ support documentation: we support C++14 and up, so we can remove these workarounds.
* Convert empty constructors to default onesRose2023-02-171-1/+1
| | | | These make the changed constructors match closer to the other ones that are default.
* Change implementation of OnlyLiteralZero to only fail if the second overload ↵Abseil Team2023-02-081-60/+59
| | | | | | | is chosen, not in overload resolution. PiperOrigin-RevId: 508031321 Change-Id: I6981371fbc6498047babe3468f3343090f8bda47
* Change Bool to BoolT in order to avoid a macro conflict from X11/Xlib.hJorg Brown2022-12-221-3/+3
| | | | | PiperOrigin-RevId: 497232675 Change-Id: Ic3cabbb85d90eb4f32a4bee17207e73475258e4b
* Replace absl::IsConvertibleHelper with std::is_convertibleAbseil Team2022-12-161-20/+1
| | | | | PiperOrigin-RevId: 495898835 Change-Id: Id2150a0505020ac2be4487e904d167a26316260c
* Eliminate span_internal::Min in favor of std::min, since Min conflicts with ↵Jorg Brown2022-11-022-4/+1
| | | | | | | a macro in a third-party library. PiperOrigin-RevId: 485653193 Change-Id: I0615ceb9ea3e1533a989470e7c9863c86b70698b
* Merge pull request #1284 from t0ny-peng:chore/remove-unused-class-in-variantCopybara-Service2022-10-031-37/+25
|\ | | | | | | | | PiperOrigin-RevId: 478500346 Change-Id: Ia15746857db3068ca74e95a447c5cc26f9450d94
| * chore: Remove unused helper ConversionIsPossible.Hao Peng2022-10-011-12/+0
|/
* Fix "unsafe narrowing" warnings in absl, 10/n.Abseil Team2022-09-082-43/+43
| | | | | | | | | | | | | | | 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
* Fixed header guards to match style guide conventions.Abseil Team2022-08-311-3/+3
| | | | | PiperOrigin-RevId: 471292183 Change-Id: Ic124d671dd3b0ae819f741885abb046cbf7e1add
* Make Span complain if constructed with a parameter that won't outlive it, ↵Abseil Team2022-07-182-6/+61
| | | | | | | except if that parameter is also a span or appears to be a view type. PiperOrigin-RevId: 461612357 Change-Id: Ibba36f44465176db47dd21e1866134549143fa64
* any_test: expand the any emplace bug suppression,Derek Mauro2022-06-151-18/+15
| | | | | | | since it has gotten worse in GCC 12 PiperOrigin-RevId: 455128070 Change-Id: Ia866e59d4e2e810aea16afe492d58013c5661a2b
* absl::Optional: suppress bogus -Wmaybe-uninitialized GCC 12 warningDerek Mauro2022-06-141-0/+8
| | | | | PiperOrigin-RevId: 454947125 Change-Id: Idbe6c8b4953c3d6147326bebc915d24dff83e7d5
* Fix C++17 constexpr storage deprecation warningsDerek Mauro2022-06-091-0/+2
| | | | | | | | | | | | | | | | | | | This change introduces the symbol ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL to guard redundant declarations of static constexpr data members that are needed prior to C++17. This change also introduces the symbol ABSL_INTERNAL_CPLUSPLUS_LANG, which is supposed to be set to the same value as __cplusplus, except it uses _MSVC_LANG on MSVC so that the value is correct on MSVC. Neither of these new symbols should be used outside of Abseil. Fixes #1191 PiperOrigin-RevId: 453923908 Change-Id: I1316c52c19fa0c168b93cced0c817e4cb7c9c862
* Obey ABSL_DEFAULT_LINKOPTS for all cc_library targetsJeremy Nimmer2022-06-061-0/+1
| | | | | | | A few targets were missing `linkopts = ...` and so were not obeying the project-wide default settings. Omit any changes to cctz for now, because it's vendored from another project.
* Fixes for C++20 support when not using std::optional.Abseil Team2022-05-101-29/+19
| | | | | | | | | | | * Avoid warnings due to deprecation of volatile return types. Also fix up optional_test.cc due to ABSL_USES_STD_OPTIONAL always being false in its body. Bug: chromium:1284275 PiperOrigin-RevId: 447796238 Change-Id: If050206c979c6c08af22e71ff0ea91e7f7932f0c
* Export of internal Abseil changesAbseil Team2022-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 3d018c03a34bf273a4b24b3584ed77f0a6d21686 by Abseil Team <absl-team@google.com>: Fix a spelling typo (s/boundries/boundaries). PiperOrigin-RevId: 442041877 Change-Id: I608020697d37b85316bb9a0838e4b457659c926c -- 518b8119e51db24ce7fb0fd2fe537ec43825c3e6 by Dino Radakovic <dinor@google.com>: absl/types/internal/variant: Make include guard uppercase https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 441911692 Change-Id: I9837dd07f20204d8253f20627b0917a34dc21825 -- b91696c38310a7cae8c1ea9e2d479495f5dc3f69 by Greg Falcon <gfalcon@google.com>: Add an internal-only API to wrap __builtin_prefetch() if available. This private API is intended for future use by the Abseil implementation. Like any internal-namespaced function, it may be changed or removed at any time. PiperOrigin-RevId: 441894616 Change-Id: Iaa48bd4680b373f4a0d5afab0cb35e2a1908595f -- 0f01e8b0551a662e02dff60840c54320f987315f by Derek Mauro <dmauro@google.com>: C++20: Use the standard `constinit` keyword for `ABSL_CONST_INIT` when available PiperOrigin-RevId: 441778874 Change-Id: I70c616469752ff23b326b1c615437599f42cc6aa GitOrigin-RevId: 3d018c03a34bf273a4b24b3584ed77f0a6d21686
* Export of internal Abseil changesAbseil Team2022-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- afa44fa0245a1cfb1824ef9697b3fa77fa9615c9 by Laramie Leavitt <lar@google.com>: Comment CMakeLists.txt about internal absl_cc_library() targets. From what I can tell, these are the CMake targets that are public: absl::algorithm absl::algorithm_container absl::base absl::core_headers absl::dynamic_annotations absl::log_severity absl::cleanup absl::btree absl::fixed_array absl::flat_hash_map absl::flat_hash_set absl::inlined_vector absl::node_hash_map absl::node_hash_set absl::debugging absl::failure_signal_handler absl::leak_check absl::leak_check_disable absl::stacktrace absl::symbolize absl::flags absl::flags_commandlineflag absl::flags_config absl::flags_marshalling absl::flags_parse absl::flags_reflection absl::flags_usage absl::bind_front absl::function_ref absl::hash absl::hash_testing absl::memory absl::meta absl::type_traits absl::bits absl::int128 absl::numeric absl::numeric_representation absl::exponential_biased absl::periodic_sampler absl::sample_recorder absl::random_bit_gen_ref absl::random_distributions absl::random_mocking_bit_gen absl::random_random absl::random_seed_gen_exception absl::random_seed_sequences absl::status absl::statusor absl::cord absl::cord_test_helpers absl::str_format absl::strings absl::synchronization absl::civil_time absl::time absl::time_zone absl::any absl::bad_any_cast absl::bad_optional_access absl::bad_variant_access absl::compare absl::optional absl::span absl::variant absl::utility PiperOrigin-RevId: 438702788 Change-Id: Icf611c35e88f03cd2493a95f61617605305d4e8e -- a99f60847578e6c0df6befadb29a01c86def0d21 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 438647928 Change-Id: I141eadd17d6e8607df25ebc893aecefa0239a72f -- b23e77e8f62a77023188594390c9e491c507d22c by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 438628502 Change-Id: I40c4297716c8c1621ba8b02a22393bfcbefb5b5e GitOrigin-RevId: afa44fa0245a1cfb1824ef9697b3fa77fa9615c9
* Export of internal Abseil changesAbseil Team2022-03-032-14/+43
| | | | | | | | | | | | | | | | | | | -- f2ffea8ae1c1b152b63bf561375cfb6eb6b9dbe5 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 432180490 Change-Id: I5e318e1d06fe26eee08920fe39f8a6285eb8e217 -- e5d0de4b3293833eab3f77252a091ac4ed74b210 by Derek Mauro <dmauro@google.com>: absl::optional - Add a workaround for an internal compiler error in GCC5 though GCC10 PiperOrigin-RevId: 432047437 Change-Id: I524a9098dadc116d8a423dd66f7ec5ee894f2874 GitOrigin-RevId: f2ffea8ae1c1b152b63bf561375cfb6eb6b9dbe5
* Export of internal Abseil changesAbseil Team2022-01-051-1/+2
| | | | | | | | | | | | | | | | | | -- 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 by Abseil Team <absl-team@google.com>: Another implicit sign conversion found and removed. PiperOrigin-RevId: 419718762 -- dbb6bca7d3cfa9ce79e70d0ed3d0354a4e3a0983 by Abseil Team <absl-team@google.com>: Fix sign conversions so that absl/status/status.h can compile with -Wconversion -Wsign-compare PiperOrigin-RevId: 419658075 GitOrigin-RevId: 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 Change-Id: I18441488cc84f573c2818ee241c387e1953d5105
* Export of internal Abseil changesAbseil Team2021-12-011-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- e2a571b818faaec4185426a8cf71fd2970674423 by Matt Kulukundis <kfm@google.com>: Fix missed use of old RTTI macro PiperOrigin-RevId: 413239579 -- e3c15a3fe0a4e44d6e08d69ad912b2245a403bd6 by Derek Mauro <dmauro@google.com>: Makes erase_if return the number of erased elements for compatibility with C++20 https://en.cppreference.com/w/cpp/container/unordered_map/erase_if This may technically be an API break, but no actual breaks were found in Google code. Fixes to open source code should be trivial. Closes #1065 PiperOrigin-RevId: 413204392 -- c1fb1ddbc2def3f3d177e5b80b9934bdbb7b16fc by Matt Kulukundis <kfm@google.com>: Consolidate to a single HAS_RTTI macro PiperOrigin-RevId: 413169336 GitOrigin-RevId: e2a571b818faaec4185426a8cf71fd2970674423 Change-Id: I74b78ebd5fc172e3f5fcbd13a58cf53f7b250ae9
* Remove bazelbuild/rules_cc dependency (#1038)Vertexwahn2021-10-141-1/+0
|
* Add missing ABSL_DLL for a few functions (#1002)Cheng Zhao2021-08-172-3/+3
|
* Export of internal Abseil changesAbseil Team2021-08-112-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 228b5878d7a994656f383666cfaee34e33e0b09b by Abseil Team <absl-team@google.com>: Add element_type typedef to match std::span<T> PiperOrigin-RevId: 390186160 -- c91d96c88c60be793c525158f76dfcaa5e32d161 by Abseil Team <absl-team@google.com>: Rollback change to only hide retired flags if human-readable output is requested PiperOrigin-RevId: 390183146 -- 170192c10ef8d513de80f29298ce93eeccc3712c by Abseil Team <absl-team@google.com>: Move alignas(16) before ABSL_CONST_INIT and ABSL_DLL. PiperOrigin-RevId: 390182845 -- 77a5ee5081c81cef625fac7bbcf993cc028b32ed by Evan Brown <ezb@google.com>: Use simple SlotOffset and AllocSize logic instead of container_internal::Layout in order to save linker input size for non-opt and sanitizer builds. In opt mode, all of this logic is inlined so we don't save linker input size in opt mode. PiperOrigin-RevId: 389914594 GitOrigin-RevId: 228b5878d7a994656f383666cfaee34e33e0b09b Change-Id: I3b904068687574931d8390071b322c0c3c083283
* CMake: add option to use Google Test already installed on system (#969)Florin Crișan2021-06-091-13/+13
| | | 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.
* Export of internal Abseil changesAbseil Team2021-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 5ff0c4b38386ae80b25e9f8d0e1bac07fd7ce92c by Martijn Vels <mvels@google.com>: Add CordzUpdateTracker class PiperOrigin-RevId: 368469046 -- 4de916b1ba4b5480b4dbe93d28c5eaa110449c66 by Derek Mauro <dmauro@google.com>: Adds `ABSL_ATTRIBUTE_LIFETIME_BOUND` to `absl::Span`s initializer_list constructor. Compilers that support this attribute will emit a warning if the parameter does not have sufficient lifetime. For more information, see https://github.com/abseil/abseil-cpp/blob/b97a1ecda869ca8754d467a56c50275cebfeb328/absl/types/span.h#L209-L248 PiperOrigin-RevId: 368429085 -- bb6669016412bf5afffc02d0818a66dfe1c524cf by Martijn Vels <mvels@google.com>: Reorganize internal cord code in CMakeLists.txt into cord_internal library PiperOrigin-RevId: 368423765 -- d1d7fce066172d5fcfa0310c4e27631d895d7e50 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 368346725 GitOrigin-RevId: 5ff0c4b38386ae80b25e9f8d0e1bac07fd7ce92c Change-Id: Ic4627eab4f0274e400a6d12cde3341fb538de075