summaryrefslogtreecommitdiff
path: root/absl/status/statusor.h
Commit message (Collapse)AuthorAge
* `absl`: Replace `absl::remove_cv_t<absl::remove_reference_t<T>>` with ↵Gravatar Dino Radakovic2023-06-02
| | | | | | | `absl::remove_cvref_t<T>` PiperOrigin-RevId: 537372070 Change-Id: I46ff6e42856aea2cd8da6ff7105cf58613603dd4
* Add semicolon at the end of the line on code exampleGravatar Abseil Team2023-05-08
| | | | | PiperOrigin-RevId: 530445615 Change-Id: I0c112773e7f42989840cb8b915167ade8833ef73
* Make `absl::StatusOr::AssignStatus` public. Recommend against using it ↵Gravatar Dino Radakovic2023-05-05
| | | | | | | outside of generic programming (attempt #2 after internal fix) PiperOrigin-RevId: 529796927 Change-Id: I755b7d907f96f4a05d01620503bf0862ce35e847
* Breaks internal codeGravatar Abseil Team2023-05-04
| | | | | PiperOrigin-RevId: 529514670 Change-Id: Ia9a19da52f58c91d5131c2a17308a7a322db2714
* Make `absl::StatusOr::AssignStatus` public. Recommend against using it ↵Gravatar Dino Radakovic2023-05-04
| | | | | | | outside of generic programming PiperOrigin-RevId: 529484669 Change-Id: I9889a9f7a7fa7dc6ef8c731f1b583a74e6afd2cf
* Add ABSL_ATTRIBUTE_LIFETIME_BOUND to absl::StatusOr::emplace()Gravatar Laramie Leavitt2023-02-03
| | | | | PiperOrigin-RevId: 506944023 Change-Id: I04ff13dcec89c57ba03707f5698c4198434216b6
* Fix comment typo about absl::Status<T*>Gravatar Derek Mauro2022-06-06
| | | | | PiperOrigin-RevId: 453241556 Change-Id: Ia92d737b6a678e3a4eda965056503392af44486a
* Fix a typo in a comment.Gravatar Abseil Team2022-04-29
| | | | | PiperOrigin-RevId: 445394311 Change-Id: I265b6a83f79bbed4321e24e6da4730a2c43ddb07
* Export of internal Abseil changesGravatar Abseil Team2022-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 7f5caec21a1a88db6486b8bc2e5f6d5baba076ed by Derek Mauro <dmauro@google.com>: Tag absl::StatusOr with [[nodiscard]] when it is available [[nodiscard]] provides better diagnostics on classes than the current ABSL_MUST_USE_RESULT, which expands to __attribute__((warn_unused_result)) Ideally we would make ABSL_MUST_USE_RESULT expand to [[nodiscard]], but we would need to fix all code to build with [[nodiscard]] first. PiperOrigin-RevId: 422628161 -- 236be69f0f34ccaa3adc831075613847797e6557 by Jorg Brown <jorg@google.com>: Make sure all of absl/strings compiles even with -Wsign-compare and -Wconversion warnings. PiperOrigin-RevId: 422573904 -- 005669883a8794e6d19dc4bbb4f0e18032e2fbc9 by Chris Kennelly <ckennelly@google.com>: Include sampling stride in hashtable sampling data. This allows us to weight each sample to control for our sampling rate. PiperOrigin-RevId: 421886935 -- 78046ce6b429b9f5b6c97b05e8448a791db93bbe by Abseil Team <absl-team@google.com>: Use __builtin_bit_cast for absl::bit_cast when possible This makes absl::bit_cast match the requirements of the standard when compiler support exists. PiperOrigin-RevId: 421883999 -- f397461f4bbeabd32437df0f2275663aeb51adb2 by Derek Mauro <dmauro@google.com>: Tag absl::Status with [[nodiscard]] when it is available [[nodiscard]] provides better diagnostics on classes than the current ABSL_MUST_USE_RESULT, which expands to __attribute__((warn_unused_result)) Ideally we would make ABSL_MUST_USE_RESULT expand to [[nodiscard]], but we would need to fix all code to build with [[nodiscard]] first. PiperOrigin-RevId: 421825565 GitOrigin-RevId: 7f5caec21a1a88db6486b8bc2e5f6d5baba076ed Change-Id: I760b45b68f6012809c70c2a584e4144a99f98733
* Fixed typo `constuct` to `construct` in 3 places. (#1022)Gravatar Martin Blais2021-09-27
|
* Export of internal Abseil changesGravatar Abseil Team2021-08-20
| | | | | | | | | | | -- 82011e44e917fb70fa00078f0bad7f787580bd8e by Abseil Team <absl-team@google.com>: Add lifetime annotations to status methods that return references. PiperOrigin-RevId: 391907063 GitOrigin-RevId: 82011e44e917fb70fa00078f0bad7f787580bd8e Change-Id: Icb2cafbf5eb1201b3bdb56a17263073e22b642e7
* Export of internal Abseil changesGravatar Abseil Team2021-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 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
* Export of internal Abseil changesGravatar Abseil Team2021-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 8e75347c10d85112296811be6ef35761744ad9bc by Derek Mauro <dmauro@google.com>: Big update to LTS release process * Add create_lts.py script to to the LTS modification This is simpler than copybara since very few changes are needed * Use the default installation paths instead of a versioned path. If a versioned path is needed, this is easy to change on the commandline. * Make the integration test use the LTS transformed version * Test both static and dynamic linking (fixes pkg-config dynamic linking) PiperOrigin-RevId: 363566934 -- e00e971a2de3138861f5e1900201c9cc7788f714 by Laramie Leavitt <lar@google.com>: Add a non-compile test to absl::BitGenRef for temporaries. PiperOrigin-RevId: 363437284 -- 3685644ec115d99789de32aceb76c32a00756fea by Derek Mauro <dmauro@google.com>: Make OSS code consistent with internal code by using the forward declaration of absl::Status that contains ABSL_MUST_USE_RESULT. PiperOrigin-RevId: 363426906 -- b85fec142c3aa3f632fa985f9f8f73a253819723 by Evan Brown <ezb@google.com>: Move raw_hash_set::infoz_ into raw_hash_set::settings_. This reduces the size of raw_hash_sets by alignof(size_t) bytes when hashtablez is disabled. PiperOrigin-RevId: 363034264 -- c6fde3b17e5845191eb8b2bfc1760c8bfb9573ff by Mark Barolak <mbar@google.com>: Internal change PiperOrigin-RevId: 362990378 -- 81713cf964905b43d1cbe32ce5fed97539029625 by Abseil Team <absl-team@google.com>: Fix typo in comment (execeptions -> exceptions). PiperOrigin-RevId: 362946191 -- 3ee92ca470feca44da417b03ee45a915c6eb5155 by Abseil Team <absl-team@google.com>: Add absl::FindAndReportLeaks and routes it to the corresponding __lsan_do_recoverable_leak_check. PiperOrigin-RevId: 362622199 -- b95b7194b20e02c20d72289fbc79a0d35b82e256 by Abseil Team <absl-team@google.com>: Add `kWithEverything` to StatusToStringMode PiperOrigin-RevId: 362595218 -- 0a960d96a0014eab7e1c55b479269450ed8e98d7 by Abseil Team <absl-team@google.com>: Accept e.g. ".__uniq" as a valid clone name. Further, bring the implementation on par with libiberty's demangler grammar. Clang introduced option -funique-internal-linkage-names that adds the suffix ".__uniq.[0-9]+" to internal linkage functions to give them a globally unique identifier. The suffix was designed to work with existing demanglers which do recognize a "_" along with the alphanumeric string. This change enhances the demangler to allow "_" with the alphanumeric string. Please refer to libiberty's cp-demangle.c where function d_clone_suffix implements the demangling of clone suffixes : 1. '_' is accepted as a valid character with the alphanumeric sequence. 2. The alphanumberic sequence is optional. 3. The digit sequence is optional. PiperOrigin-RevId: 362557420 -- 2ac5ea212c150afd2f58025a5cab8c45d16949c6 by Abseil Team <absl-team@google.com>: Change variable name 'slots' to 'slot_count' to avoid name-clash with Qt builds. PiperOrigin-RevId: 362556289 -- 934f0f409c9c548716a46363d6e243406fad4028 by Mark Barolak <mbar@google.com>: Clarify the comment on ABSL_CACHELINE_SIZE to indicate that the macro definition itself shouldn't change, but rather that call sites should change when possible. This addresses the request for improved documentation in https://github.com/abseil/abseil-cpp/pull/842. PiperOrigin-RevId: 362354288 GitOrigin-RevId: 8e75347c10d85112296811be6ef35761744ad9bc Change-Id: I33ec8561d8d645c3353e9d2dd447501d0e1825a7
* Export of internal Abseil changesGravatar Abseil Team2020-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 017c3924d21132085bc20c9be0ae469bfbf2c56c by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 338723934 -- 8b08c23d7b05232e283b1388cee3eb5bebc2d9c4 by Derek Mauro <dmauro@google.com>: Add script to test GCC floor (the minimum version of GCC we support, currently the GCC 5 series) PiperOrigin-RevId: 338708581 -- afa440ac7c843126b4f99b89ebc071dda1d85a4d by Abseil Team <absl-team@google.com>: Fix typo in documentation of StatusOr::value_or() ('of' -> 'if'). PiperOrigin-RevId: 338690089 -- 97d5008865327fc36b942b96de0d0cacfb909df5 by Derek Mauro <dmauro@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 338568224 -- da5e09a7fedb3217329465d9206b7cbc6677176b by Abseil Team <absl-team@google.com>: Add `absl_btree_prefer_linear_node_search` Allow keys of `btree_set`, `btree_map`, `btree_multiset`, and `btree_multimap` to opt-in to linear search (instead of binary search). Linear search was used previously for arithmetic types with `key_compare` of `std::greater` or `std::less`. For example, this would be useful for key types that wrap an integer and define their own cheap `operator<()`. ``` class K { public: using absl_btree_prefer_linear_node_search = std::true_type; ... private: friend bool operator<(K a, K b) { return a.k_ < b.k_; } int k_; }; absl::btree_map<K, V> m; // Uses linear search assert((absl::btree_map<K, V>::testonly_uses_linear_node_search())); ``` PiperOrigin-RevId: 338476553 -- c56ead7ce6b0a5ad32e3a42904c686448a69451e by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 338419417 GitOrigin-RevId: 017c3924d21132085bc20c9be0ae469bfbf2c56c Change-Id: I1199f3ae917280a3ef20ccc6038abbe34d96ec0b
* Export of internal Abseil changesGravatar Abseil Team2020-10-02
| | | | | | | | | | | | | | | | | | -- ef529b5fc5d72de02c145ae6643af0465090252b by Abseil Team <absl-team@google.com>: Fix typo in comment (foo -> i). PiperOrigin-RevId: 334894645 -- 18aab6f6c71e6abd83d467dbf8868df24100e710 by Abseil Team <absl-team@google.com>: Fix -Wno-sign-compare error PiperOrigin-RevId: 334837327 GitOrigin-RevId: ef529b5fc5d72de02c145ae6643af0465090252b Change-Id: Ieeedf1a4fd458eb38ffbda0ca77a47021b510043
* Export of internal Abseil changesGravatar Abseil Team2020-09-08
| | | | | | | | | | | | | | | | | | -- 306a7201c5d9fd2fa5bd4f50ea46a61e1f69925b by Abseil Team <absl-team@google.com>: Minor documentation cleanup. PiperOrigin-RevId: 330546393 -- f62a256057797d0a85715ed944760fa62e1ce7a1 by Abseil Team <absl-team@google.com>: Fix typo in comment abls:: -> absl:: PiperOrigin-RevId: 330286163 GitOrigin-RevId: 306a7201c5d9fd2fa5bd4f50ea46a61e1f69925b Change-Id: I9ac174396d1b0fcf9b3e0b8a2b00e088b3eb69cd
* Export of internal Abseil changesGravatar Abseil Team2020-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 8ae3cb636b81b6498ef30fbe59cc102a4098cad2 by Tom Manshreck <shreck@google.com>: Upgrade absl::StatusOr<T> docs to Abseil standards PiperOrigin-RevId: 329975341 -- 7c7baf586c7380497a751f1a186a4ef0e650161a by Tom Manshreck <shreck@google.com>: Update absl::Status to Abseil documentation standards PiperOrigin-RevId: 329942967 -- 6710d022ba987dbae7a5d83045a6697afeb972c4 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 329775111 -- fd182dc699e18522ef16d269731c57669c5487d2 by Abseil Team <absl-team@google.com>: Google-internal change. PiperOrigin-RevId: 329737362 -- c0df5e27ffb48d9c784e7019267580fcb4a3f92e by Xiaoyi Zhang <zhangxy@google.com>: Remove obsolete `static_assert`. PiperOrigin-RevId: 329727604 GitOrigin-RevId: 8ae3cb636b81b6498ef30fbe59cc102a4098cad2 Change-Id: Ic9dede0ab97f799e7f4093fae75ae0ec6cc21437
* Export of internal Abseil changesGravatar Abseil Team2020-09-01
-- 23500704dd7c2642fad49f88c07ce41ebaab12e4 by Abseil Team <absl-team@google.com>: Change fetch_add() to store(1 + load()) As there is only one concurrent writer to the Info struct, we can avoid using the more expensive fetch_add() function. PiperOrigin-RevId: 329523785 -- 79e5018dba2e117ad89b76367165a604b3f24045 by Abseil Team <absl-team@google.com>: Record rehash count in hashtablez This will help identify which containers could benefit from a reserve call. PiperOrigin-RevId: 329510552 -- e327e54b805d67556f934fa7f7dc2d4e72fa066a by Abseil Team <absl-team@google.com>: Fix -Wsign-compare issues. These lines could theoretically have overflowed in cases of very large stack traces etc. Very unlikely, but this was causing warnings when built with -Wsign-compare, which we intend to enable with Chromium. In none of these three cases is it trivial to switch to a range-based for loop. PiperOrigin-RevId: 329415195 -- 08aca2fc75e8b3ad1201849987b64148fe48f283 by Xiaoyi Zhang <zhangxy@google.com>: Release absl::StatusOr. PiperOrigin-RevId: 329353348 -- bf4d2a7f8b089e2adf14d32b0e39de0a981005c3 by Xiaoyi Zhang <zhangxy@google.com>: Internal change PiperOrigin-RevId: 329337031 -- 42fa7d2fb993bbfc344954227cf1eeb801eca065 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 329099807 GitOrigin-RevId: 23500704dd7c2642fad49f88c07ce41ebaab12e4 Change-Id: I6713e4ca3bb0ab2ced5e487827ae036ab8ac61f1