aboutsummaryrefslogtreecommitdiffhomepage
path: root/absl/types/variant_test.cc
Commit message (Collapse)AuthorAge
* Export of internal Abseil changesGravatar Abseil Team2019-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 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
* Export of internal Abseil changesGravatar Abseil Team2019-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 2f49cb9009386bc67bf54a2908c8720b749c8b7f by Greg Falcon <gfalcon@google.com>: docs: fix typo Import of https://github.com/abseil/abseil-cpp/pull/397 PiperOrigin-RevId: 277504420 -- f2bed362c1c12d3fa9c22d11f2b918668e8c37b7 by Abseil Team <absl-team@google.com>: Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain. PiperOrigin-RevId: 277502334 -- e33de894ffd49848b9e088f59acc9743d1661948 by Derek Mauro <dmauro@google.com>: Update rules_cc version. The mirror.bazel.build URL does not exist (cache expiration?) PiperOrigin-RevId: 277498394 -- b23757b0747c64634d2d701433782c969effef19 by Abseil Team <absl-team@google.com>: Fix https://github.com/abseil/abseil-cpp/issues/394. PiperOrigin-RevId: 277491405 -- 54c75b8b29813531c52d67cf0ba7063baae4a4f3 by Abseil Team <absl-team@google.com>: Fix comment typos: waker => waiter. PiperOrigin-RevId: 277376952 -- 874eeaa3b3af808fc88b6355245f643674f5e36e by Abseil Team <absl-team@google.com>: Don't use atomic ops on waiter and wakeup counts in CONDVAR waiter mode. Just guard the waiter and wakeup counts with the mutex. This eliminates the race. Also fix a typo in the error message for pthread_cond_timedwait. PiperOrigin-RevId: 277366017 -- ce8c9a63109214519b5a7eaecef2c663c4d566df by Greg Falcon <gfalcon@google.com>: Implement the config options for our four main C++ forward compatibility types. These options control whether the names `any`, `optional`, `string_view`, and `variant` in namespace `absl` are aliases to the corresponding C++17 types in namespace `std`. By default, we continue to auto-detect the configuration of the compiler being run. These options are not intended to be modified on the command line (as -D flags, say). Instead, the options.h file can be modified by distributors of Abseil (e.g., binary packagers, maintainers of local copies of Abseil, etc.) Changing options will change Abseil in an ODR sense. Any program must only link in a single version of Abseil. Linking libraries that use Abseil configured with different options is an error: there is no ABI compatibility guarantee when linking different configurations, even if the Abseil versions used are otherwise exactly identical. PiperOrigin-RevId: 277364298 -- 5ed3ad42ae43a05862070f92f9ffd07f5c1f2b81 by Chris Kennelly <ckennelly@google.com>: Suppress -Wimplicit-int-float-conversion. On recent builds of Clang, this is an error/warning. PiperOrigin-RevId: 277346168 -- 9b9b0055243c705189bb27d912e6d45a7789cdee by Eric Fiselier <ericwf@google.com>: Allow building Abseil as a shared library with CMake. By default CMake's `add_library` creates the target as a static library. However, users can override the default using the builtin CMake option -DBUILD_SHARED_LIBS=ON. This changes Abseil's CMake to respect this configuration option by removing the explicit `STATIC` in our usages of `add_library`. PiperOrigin-RevId: 277337753 -- 63a8b7b8ede3a9d851916929d6b8537f4f2508ca by Abseil Team <absl-team@google.com>: Improve AlphaNum Hex performance by using absl::numbers_internal::FastHexToBufferZeroPad16. PiperOrigin-RevId: 277318108 -- dd047f7e92032682d94b27732df0e4d0670e24a4 by CJ Johnson <johnsoncj@google.com>: Internal change PiperOrigin-RevId: 277316913 -- d19ee7074929fed08973cc5b40a844573ce1e0a6 by Abseil Team <absl-team@google.com>: Handle invoking [[nodiscard]] functions correctly in our tests. PiperOrigin-RevId: 277301500 -- 5373f3737894ba9b8481e95e5f58c7957c00d26a by Chris Kennelly <ckennelly@google.com>: For internal reasons, loosen visibility restrictions of `//absl/base:malloc_internal`. As an internal-namespace interface, this module remains unsupported. We reserve the right to change, delete, or re-restrict visibility to this target at any time. PiperOrigin-RevId: 277118689 -- 44e4f6655e05393a375d09b3625c192b1fde5909 by Abseil Team <absl-team@google.com>: Fix error in example civil day comment. PiperOrigin-RevId: 277103315 -- 7657392b4ce48469106f11cdb952a0bc76a28df3 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 277056076 -- c75bda76f40b01fa249b75b5a70c1f5907e56c76 by Abseil Team <absl-team@google.com>: Suppress lifetime constant-initialization tests when building with MSVC versions > 19.0. These are broken due to non-compliant initialization order in these versions: https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html We don't know when Microsoft will fix this bug. PiperOrigin-RevId: 277049770 -- 16c3b9bf2a1796efa57f97b00bcd6227fbccca1f by Matt Calabrese <calabrese@google.com>: Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain. PiperOrigin-RevId: 277048670 -- e91003fa3ee6026d9b80624a23fc144fa5d74810 by Chris Kennelly <ckennelly@google.com>: Fix -Wimplicit-int-float-conversion warning in latest clang PiperOrigin-RevId: 276771618 -- 53087ca6603e86ad815f3dd9ab795cc0f79792c1 by Andy Soffer <asoffer@google.com>: Add documentation on absl::SNPrintF. PiperOrigin-RevId: 276694032 -- a9426af8cbd4c3a8f9053e7446c821852e41ff61 by Jorg Brown <jorg@google.com>: Stop including kern/OSByteOrder.h in order to support __APPLE__ Apple compiles with clang now anyway, and clang has support for the built-in compiler swap functions that are much faster than any function call to the OS. PiperOrigin-RevId: 276625231 -- df974be5aa5b4dc1b09c356cb8816edfc7867e63 by Jorg Brown <jorg@google.com>: Fix the build for Android x86-64 builds, where __SSE4_2__ is defined but _bswap64 is not. PiperOrigin-RevId: 276542642 -- d99dc092b3a5ad17643005e55f3b3cb6b9187ccc by Jorg Brown <jorg@google.com>: Remove a byteswap from the non-SSE path of FastHexToBufferZeroPad16 Remove the need for including absl/base/internal/endian.h from the SSE case (since if we have the Intel SSE intrinsics, then clearly we also have the Intel Byte-Swap intrinsics.) PiperOrigin-RevId: 276532608 -- d67b106dc930d8558810ae3983613bb2ab1e0d36 by Abseil Team <absl-team@google.com>: Use explicit static_cast<double> for int64_t to double conversion This uses an explicit static_cast<double>() in the int64_t to double comparisons in duration.cc's SafeAddRepHi. This satisfies clang's -Wimplicit-int-to-float-conversion warning (with https://reviews.llvm.org/D64666). This may also make it easier for humans to realize that the comparison is happening between two floating point double precision values. It should have no impact on the behavior or generated code. Tested: No behavior change PiperOrigin-RevId: 276529211 GitOrigin-RevId: 2f49cb9009386bc67bf54a2908c8720b749c8b7f Change-Id: I71e0781893ce219960b8290d54b20532779cb0ff
* Export of internal Abseil changesGravatar Abseil Team2019-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- bc74316103bbda92541896f588f71c9d45bea768 by Gennadiy Civil <misterg@google.com>: Manually fixing the BUILD.bazel files -- d41bf9ea916a0dc8c69e6ba77f58f9d55649880e by Shaindel Schwartz <shaindel@google.com>: Minor cleanup to miscellaneous BUILD files. PiperOrigin-RevId: 266420157 -- 08a8dc2cbd48d27e1115809f9ca8d178551cd66e by Gennadiy Civil <misterg@google.com>: Internal Change BEGIN_PUBLIC Internal Change END_PUBLIC -- 8617d58fde1ece40e4aa79eaa5e250b42d19835f by Shaindel Schwartz <shaindel@google.com>: Internal Change BEGIN_PUBLIC Internal Change END_PUBLIC -- 3a0fc7d48bdc70c4f7dffc219578693dea84eb2d by Derek Mauro <dmauro@google.com>: Implement absl::string_view::at() PiperOrigin-RevId: 266024644 -- ba53a9da8ede8fe7b8971eaab6b3a1fa34763ff6 by Andy Soffer <asoffer@google.com>: Remove forcing of optimization levels in MSVC. PiperOrigin-RevId: 265927588 -- df86f2046b54bba7da2e345040806d43470de5c0 by Shaindel Schwartz <shaindel@google.com>: Internal change PiperOrigin-RevId: 265811077 -- e2e3a6e8194363e7c6377672560c806d638a7c74 by Derek Mauro <dmauro@google.com>: Remove ABI unsafe mixed exceptions mode compilation. Testing will now be done on CI with the exceptions flag set globally. PiperOrigin-RevId: 265796079 GitOrigin-RevId: bc74316103bbda92541896f588f71c9d45bea768 Change-Id: Ibccd00f4829520454aa55c4f55c7cb2dc9c6b65a
* Export of internal Abseil changesGravatar Abseil Team2019-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 0f6565955231dc74ebad62ef32a18c457afa2dc7 by Abseil Team <absl-team@google.com>: Document guarantee that we do not move from rvalue arguments if no insertion happens with absl::raw_hash_map::try_emplace, as done with std::unordered_map::try_emplace. PiperOrigin-RevId: 264430409 -- 292e6b9e08fa689e8400d7f2db94cbcab29d5889 by CJ Johnson <johnsoncj@google.com>: Removes use of aligned_storage in FixedArray and InlinedVector in favor of aligned char buffers. PiperOrigin-RevId: 264385559 -- aa0b19ad11ae5702022feee0e2e6434cfb28c9e9 by Derek Mauro <dmauro@google.com>: Make the unit tests for absl::any, absl::optional, and absl::variant no-ops when these types are just aliases for the corresponding std:: types. We have no way to fix standard library implementation bugs, so don't bother working around them. Also disable the corresponding exception-safety tests as well when exceptions are not enabled. Fixes https://github.com/abseil/abseil-cpp/pull/360 PiperOrigin-RevId: 264382050 -- 65896a911f36481b89b4712c83b91c90a76b64e8 by Abseil Team <absl-team@google.com>: Improve documentation on erase PiperOrigin-RevId: 264381266 GitOrigin-RevId: 0f6565955231dc74ebad62ef32a18c457afa2dc7 Change-Id: I74b9bd2ddf84526014104f17e87de70bd3fe65fa
* Export of internal Abseil changes.Gravatar Abseil Team2019-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- c2e2e2b21c3fe59b63279e7418c93c7289ee3e27 by Mark Barolak <mbar@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 256220326 -- 3996b01f0c3eb60f72825b154dce8019b6215f1d by Derek Mauro <dmauro@google.com>: Add GCC 4.9 test script. This will become our new minumum version and GCC 4.8 will be removed soon. PiperOrigin-RevId: 256160891 -- 2c13aa44bc8e497ebae9abe8b8adf73c2152622d by Abseil Team <absl-team@google.com>: [Trivial] tweak flat_hash_map.h doc comment The comment is probably right both ways, but the lack of an "if" here seemed jarring to me. PiperOrigin-RevId: 256089069 -- 16bc03b9b30fbf08d7dc61025fa8ec4b57077be8 by Abseil Team <absl-team@google.com>: Fix symbolization for elf files whose SYMTAB section is stripped, but have a DYNSYM section. Previously, if we did not find a SYMTAB section, we would bail out of symbolization early, rather than checking the DYNSYM section. PiperOrigin-RevId: 256061954 -- 4c60ee329b1eeb0b0d10c4f76f282e5fbae2c5b2 by Derek Mauro <dmauro@google.com>: Update to LLVM r363242 and Bazel 0.27.0 PiperOrigin-RevId: 256024405 -- 18e1ba970d33f122026803d8ca90035b9088949d by Eric Fiselier <ericwf@google.com>: Disable variant tests that break with P0608R3 PiperOrigin-RevId: 255975764 -- 0a89858464977e86096b62476faa3b64eb94aa1d by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 255891019 -- 9b7424cac66f5407f0ed74ed288bf3099a4fa330 by CJ Johnson <johnsoncj@google.com>: Updates the implementation of InlinedVector::insert(...) to be exception safe and adds an exception safety tests for insert(...) PiperOrigin-RevId: 255881809 -- 1288f4ba3883c510d92b09437fb8b051c19aa241 by CJ Johnson <johnsoncj@google.com>: Updates the implementation of InlinedVector::insert(...) to be exception safe and adds an exception safety tests for insert(...) PiperOrigin-RevId: 255875277 -- 39c04f3621491eaff9e2eda619718d5b5f20fbd9 by Abseil Team <absl-team@google.com>: Use a typedef to allow building with NVCC Without this change NVCC fails to compile compressed_tuple.h. NVCC is relevant because TensorFlow uses NVCC on Ubuntu and inclues abseil. PiperOrigin-RevId: 255850176 -- e23f0309ccad69eb508ca02c9034cd4cdd740da0 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 255787167 -- 054aafcebf595077054164f1da3703124ab209b4 by Abseil Team <absl-team@google.com>: Updates the ScopedAllocatorWorks test for InlinedVector to not rely on the byte count allocated by the standard library In doing so, removes LegacyNextCapacityFrom(...) impl function from InlinedVector Also applies clang-format to the test file PiperOrigin-RevId: 255760356 -- eb05fc9f78e3a163c93f1866e9fe9a8ad0d01622 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 255706834 -- 97abb824417604c45d9fcbb3e4ff1aa3000836f2 by Jorg Brown <jorg@google.com>: Enhance compatibility of abseil's strings package with nvcc. PiperOrigin-RevId: 255688500 -- efc5b9c221ee31e15d10b35d31c8f3ae6eddaa8c by Abseil Team <absl-team@google.com>: Follow CCTZ's lead and allow GetWeekday() and GetYearDay() to be called with any civil-time type. A CivilSecond, for example, has a weekday just as much as a CivilDay does. PiperOrigin-RevId: 255659840 -- a75acbe954457919d8c6c8f4c2339b543760b375 by Derek Mauro <dmauro@google.com>: Increase the timeout of randen_engine_test. It seems to timeout under TSAN often enough to justify the increase. PiperOrigin-RevId: 255628086 -- 160976ba47c7c6eb57af08e21f8eb640aa51e91b by Derek Mauro <dmauro@google.com>: Update CMake documentation Fixes https://github.com/abseil/abseil-cpp/issues/332 PiperOrigin-RevId: 255607313 GitOrigin-RevId: c2e2e2b21c3fe59b63279e7418c93c7289ee3e27 Change-Id: Iba4ac7ed23cbcdb22965b4958601f689be92cda4
* The order of the operators in the struct should match the order of the test ↵Gravatar Rasesh Patel2019-06-10
| | | | | cases This makes it a bit easier to follow the logic for anyone reading the tests as docs.
* Export of internal Abseil changes.Gravatar Abseil Team2019-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4a21ad4ffa957d28b770de8717289fab7410f567 by Gennadiy Rozental <rogeeff@google.com>: Internal cleanup PiperOrigin-RevId: 252366381 -- b6b0f25439549c54f1537a16625be1fecd3c7d8c by Xiaoyi Zhang <zhangxy@google.com>: Fix C4245 compiler warning of visual studio. This allows using abseil headers in code requiring strict warning settings. This is an import of https://github.com/abseil/abseil-cpp/pull/321. PiperOrigin-RevId: 252101240 -- 0543b7861b658a5a665298e1d868e29968ff7b27 by CJ Johnson <johnsoncj@google.com>: Adds new benchmarks for the constructors of InlinedVector PiperOrigin-RevId: 251905349 -- c65a08507917e9f8f6450b8beb235fe1426d7954 by CJ Johnson <johnsoncj@google.com>: Updates the InlinedVector BatchedBenchmark abstractions to 1) provide the index of the instance back to the prepare and test functions so that callers may perform extra work on local state with a unique per-instance ID and 2) reduce the number of manually written calls to BENCHMARK_TEMPLATE. PiperOrigin-RevId: 251895546 -- 99a1ae2d786b80096172f6e018711e15c0c750b9 by Samuel Benzaquen <sbenza@google.com>: Fix ambiguous construction problem in absl::variant<> to make in line with std::variant. ImaginaryFun is hiding duplicate objects instead of causing ambiguity. Add a second unique argument to make sure all overloads exist in the final overload set. PiperOrigin-RevId: 251860694 -- b54d0a12673be6ebb6e77e24a556ce9b758b3a7e by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 251739183 -- f51b115e0dc3fc9a9c9c20b33a1f27027a700d48 by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 251686812 -- 30e868049282dc6a6fc77d923ca7d2a5d35a1658 by Xiaoyi Zhang <zhangxy@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 251652119 GitOrigin-RevId: 4a21ad4ffa957d28b770de8717289fab7410f567 Change-Id: I7171cb613793fa90e0eb0143b65ec8264a2a84db
* Export of internal Abseil changes.Gravatar Abseil Team2019-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 5a5dba4252e764e6737070bf0a31074bf23a3b41 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 244898913 -- 3eb7d5b445ffbf08a104e39cd15aecf568417333 by Matt Calabrese <calabrese@google.com>: Introduce absl::is_trivially_move_constructible and absl::is_trivially_move_assignable, and update the absl::is_trivially_copy_constructible and absl::is_trivially_copy_assignable traits to use similar techniques (should now be closer to the standard behavior). PiperOrigin-RevId: 244859015 -- 7da05a24fa786cab3985de0c39a186d73dcbcfb5 by Abseil Team <absl-team@google.com>: Fix misspellings in comments in raw_hash_set.h. PiperOrigin-RevId: 244754700 -- 5c057be96048f21473d5ec45005ab4dcd8dd354f by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 244744239 -- 592394e3c2e98f1238d3fb6fcb0d20c3e3739ba9 by Derek Mauro <dmauro@google.com>: Limit the raw_hash_set prefetch test to x86-64. PiperOrigin-RevId: 244737534 -- 99ebe4e003633c8ff7838b035b31a827994879ef by Derek Mauro <dmauro@google.com>: Workaround warning 4091 in an MSVC header. PiperOrigin-RevId: 244701744 -- 0aa23f09a32efe7985ee55b0217190f08da42477 by Abseil Team <absl-team@google.com>: Fix comment typo. PiperOrigin-RevId: 244659371 -- c6cdb87e9f28062c8daa29b3d8d68182ecc16383 by Derek Mauro <dmauro@google.com>: Fix -Wundef warnings and support -Wundef. PiperOrigin-RevId: 244244968 -- 06b81245f7696b20c3c63b0618d33ac25e29cad6 by Abseil Team <absl-team@google.com>: Fix a typo in inlined_vector.h. PiperOrigin-RevId: 244230809 -- 94877a2125d2cfe837384240e4d6551f39d737e4 by Greg Falcon <gfalcon@google.com>: Fix sysinfo_test for emscripten. PiperOrigin-RevId: 244198804 -- ec7783531ef7f9df2da37d341d61f7cb2bf843f0 by Shaindel Schwartz <shaindel@google.com>: Import of CCTZ from GitHub. Fixes #291. PiperOrigin-RevId: 244184598 -- b652c14fa95ea206c217487ee713b11f5d1762b3 by Matt Calabrese <calabrese@google.com>: Emulate the `in_place_index` and `in_place_type` variable templates such that they are syntactically usable in C++11 with `any` and `variant`. Also pull in the variable templates from namespace std when available. The main observable differences here are: 1) The types of `in_place_index_t<I>` and `in_place_type_t<T>` become function pointer types rather than structs when using the implementation that is not an alias of the std equivalents. 2) The types of `in_place_index<I>` and `in_place_type<T>` are not directly `in_place_index_t<I>` and `in_place_type_t<T>`, but rather they become function types that decay to the corresponding function pointer types. 3) The default constructor for `in_place_index_t` and `in_place_type_t` instantiations is no longer explicit, but for these templates I think that's less important than for something like `in_place_t` since the _type_t and _index_t versions basically never have their template parameter non-deduced when participating in overload resolution with conflicting candidates. 4) While idiomatic usage of `in_place_type_t` and `in_place_index_t` with std::variant and std::any should not be affected, there is the possibility that strange, non-idiomatic uses may be affected in the wild. 5) Default construction (rather than value-initialization) leads to a default-constructed pointer. PiperOrigin-RevId: 244180003 -- b9ac5a96581837ffa24532117b7ea302a5569751 by Derek Mauro <dmauro@google.com>: Fix MSVC debug assertion. isprint is undefined for values not representable as unsigned char or EOF. PiperOrigin-RevId: 244083005 -- 41758be6137c2f25e84b50f23938e49484be2903 by Shaindel Schwartz <shaindel@google.com>: Update config settings for Apple platforms. PiperOrigin-RevId: 244040587 -- c90df6a26db94b0305a0c954455a621542a89d91 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 244024427 -- c71e9ceb89495354eca7d02bd905ffeaa9029aec by Derek Mauro <dmauro@google.com>: Adds missing ABSL_DEFAULT_COPTS and ABSL_TEST_COPTS to CMakeLists.txt Don't error on deprecated declarations in tests. It is completely reasonable to test that code marked deprecated still works. PiperOrigin-RevId: 244003941 -- e1326a96527a8ba9b8d120161545260da9c4562e by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 243990623 -- 90b8e12934c7711e1bfcc0117d21288bf9220dee by Abseil Team <absl-team@google.com>: Add variation of absl::Base64Escape/WebSafeBase64Escape that directly returns its result. PiperOrigin-RevId: 243894308 -- 317fef3344481ebc5c35712d42f5d8a0fa64dff4 by Abseil Team <absl-team@google.com>: Enable raw logging in Emscripten builds. PiperOrigin-RevId: 243893705 GitOrigin-RevId: 5a5dba4252e764e6737070bf0a31074bf23a3b41 Change-Id: I19293aab73cc98d9e9bf6a9fdc30819764adb9db
* Export of internal Abseil changes.Gravatar Abseil Team2019-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- bdce7e57e9e886eff1114d0266781b443f7ec639 by Derek Mauro <dmauro@google.com>: Change {Get|Set}EnvironmentVariable to {Get|Set}EnvironmentVariableA for compatibility with /DUNICODE. PiperOrigin-RevId: 239229514 -- 2276ed502326a044a84060d34eb19d499e3a3be2 by Derek Mauro <dmauro@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 239228622 -- a462efb970ff43b08a362ef2343fb75ac1295a50 by Derek Mauro <dmauro@google.com>: Adding linking of CoreFoundation to CMakeLists in absl/time. Import https://github.com/abseil/abseil-cpp/pull/280. Fix #283 PiperOrigin-RevId: 239220785 -- fc23327b97f940c682aae1956cf7a1bf87f88c06 by Derek Mauro <dmauro@google.com>: Add hermetic test script that uses Docker to build with a very recent version of gcc (8.3.0 today) with libstdc++ and bazel. PiperOrigin-RevId: 239220448 -- 418c08a8f6a53e63b84e39473035774417ca3aa7 by Derek Mauro <dmauro@google.com>: Disable part of the variant exeception safety test on move assignment when using versions of libstd++ that contain a bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87431#c7 PiperOrigin-RevId: 239062455 -- 799722217aeda79679577843c91d5be62cbcbb42 by Matt Calabrese <calabrese@google.com>: Add internal-only IsSwappable traits corresponding to std::is_swappable and std::is_nothrow_swappable, which are used with the swap implementations of optional and variant. PiperOrigin-RevId: 239049448 -- aa46a036038a3de5c68ac5e5d3b4bf76f818d2ea by CJ Johnson <johnsoncj@google.com>: Make InlinedVectorStorage constructor explicit PiperOrigin-RevId: 239044361 -- 17949715b3aa21c794701f69f2154e91b6acabc3 by CJ Johnson <johnsoncj@google.com>: Add absl namesapce to internal/inlined_vector.h PiperOrigin-RevId: 239030789 -- 834628325953078cc08ed10d23bb8890e5bec897 by Derek Mauro <dmauro@google.com>: Add test script that uses Docker to build Abseil with gcc-4.8, libstdc++, and cmake. PiperOrigin-RevId: 239028433 -- 80fe24149ed73ed2ced995ad1e372fb060c60427 by CJ Johnson <johnsoncj@google.com>: Factors data members of InlinedVector into an impl type called InlinedVectorStorage so that (in future changes) the contents of a vector can be grouped together with a single pointer. PiperOrigin-RevId: 239021086 -- 585331436d5d4d79f845e45dcf79d918a0dc6169 by Derek Mauro <dmauro@google.com>: Add -Wno-missing-field-initializers to gcc compiler flags. gcc-4.x has spurious missing field initializer warnings. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750 PiperOrigin-RevId: 239017217 -- 94602fe4e33ee3a552a7f2939c0f57a992f55075 by Abseil Team <absl-team@google.com>: Formatting fixes. PiperOrigin-RevId: 238983038 -- a1c1b63c08505574e0a8c491561840cecb2bb93e by Derek Mauro <dmauro@google.com>: Add hermetic test script that uses Docker to build with a very recent version of clang with libc++ and bazel. PiperOrigin-RevId: 238669118 -- e525f8d20bc2f79a0d69336b902f63858f3bff9d by Derek Mauro <dmauro@google.com>: Disable the test optionalTest.InPlaceTSFINAEBug until libc++ is updated. PiperOrigin-RevId: 238661703 -- f99a2a0b5ec424a059678f7f226600f137b4c74e by Derek Mauro <dmauro@google.com>: Correct the check for the FlatHashMap-Any test bug (list conditions instead of platforms when possible) PiperOrigin-RevId: 238653344 -- 777928035dbcbf39f361eb7d10dc3696822f692f by Jon Cohen <cohenjon@google.com>: Add install rules for Abseil CMake. These are attempted to be limited to in-project installation. This serves two purposes -- first it's morally the same as using Abseil in-source, except you don't have to rebuild us every time. Second, the presence of an install rule makes life massively simpler for package manager maintainers. Currently this doesn't install absl tests or testonly libraries. This can be added in a follow-up patch. Fixes #38, Fixes #80, Closes #182 PiperOrigin-RevId: 238645836 -- ded1c6ce697c191b7a6ff14572b3e6d183117b2c by Derek Mauro <dmauro@google.com>: Add hermetic test script that uses Docker to build with a very recent version of clang with libstdc++ and bazel. PiperOrigin-RevId: 238517815 GitOrigin-RevId: bdce7e57e9e886eff1114d0266781b443f7ec639 Change-Id: I6f745869cb8ef63851891ccac05ae9a7dd241c4f
* Changed HTTP URLs to HTTPS where possible (#270)Gravatar nik72732019-03-08
|
* Export of internal Abseil changes.Gravatar Abseil Team2019-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 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
* Export of internal Abseil changes.Gravatar Abseil Team2019-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 6fdf24a197b964f9bacbebd0ceca305aef1654fc by Shaindel Schwartz <shaindel@google.com>: Internal change PiperOrigin-RevId: 231627312 -- 65f7faf52bff01384171efb85fee159378dedf70 by CJ Johnson <johnsoncj@google.com>: Relocates the definitions of the InputIterator-accepting parts of the InlinedVector API into the top-level. The removed functions had no other callers so there was no reason to keep the layer of indirection in the form of the function call. PiperOrigin-RevId: 231527459 -- 30e105b749b5ecc50fdaf26c7da589617efce425 by CJ Johnson <johnsoncj@google.com>: Relocates closing brace for absl namespace in InlinedVector to the correct end location PiperOrigin-RevId: 231477871 -- 063c1e8b9d1f032662c46d574e20ecc357b87d0c by Eric Fiselier <ericwf@google.com>: Cleanup std::hash probing metafunctions. Previously there were two different ways to probe for std::hash. One in hash.h and another in type_traits.h, and they were both implemented differently, and neither correctly worked around bad STL implementations. This patch unifies the implementations into a single IsHashable trait. It also: * Correctly checks for old libc++ versions where this won't work. * Avoids undefined behavior which resulted from calling std::is_constructible incomplete types. * Unifies the feature test macro used in the headers and the tests. Additionally it also slightly changes the behavior of when absl::variant is hashable. Previously we disable hashing when std::hash<T>()(key) was formed but when std::hash<T> couldn't be destructed. This seems wrong. If a user provides a evil specialization of std::hash, then it's OK for variant's hash to blow up. PiperOrigin-RevId: 231468345 -- 05d75dd4b07c893de9b104731644d0d207b01253 by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 231397518 -- a0ee9032f9e04039f3410ed17fcf45ae1a3868f5 by CJ Johnson <johnsoncj@google.com>: Remove unused EnableIfAtLeastInputIterator from InlinedVector PiperOrigin-RevId: 231348903 -- 4dcd4e9a6780a81d7a6974c7bf22a037e6482b49 by Abseil Team <absl-team@google.com>: Remove unnecessary register keyword from absl/base/internal/endian.h. PiperOrigin-RevId: 231316570 -- c8584836caa3a10f90a8604a85d4b831310b72ee by Abseil Team <absl-team@google.com>: Fix hashtablez_sampler compilation on older Android NDK builds PiperOrigin-RevId: 231283542 GitOrigin-RevId: 6fdf24a197b964f9bacbebd0ceca305aef1654fc Change-Id: I185b12fb8347e3ad0ffcb2cbb83a53450e5eb938
* Export of internal Abseil changes.Gravatar Abseil Team2019-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 70b243f160a2f0f222066f62e06cc4346aea683d by Gennadiy Civil <misterg@google.com>: Replace tests with new googletest Test Suite APIs PiperOrigin-RevId: 228901526 -- 28fe449f416c3d3fe882ef3dfa4289b94be5f8af by CJ Johnson <johnsoncj@google.com>: Changes the style of enable_if on InlinedVector::insert(...) to match all others PiperOrigin-RevId: 228878640 -- 5b4732f783d16cfb19c8c42962201aafe12b3c0f by Abseil Team <absl-team@google.com>: Update the absl::FromDateTime() deprecation message to refer to absl::FromCivil(), the recommended replacement despite a slight change in behavior for skipped civil times. PiperOrigin-RevId: 228820837 -- ee77056d753bb8665236a173064af85d935acfc4 by Gennadiy Civil <misterg@google.com>: Bump googletest to the latest PiperOrigin-RevId: 228792994 -- aebc04f76b83a26432dba8e6199c971d5b69df0f by CJ Johnson <johnsoncj@google.com>: Switches InlinedVector input/forward iterator tagged dispatch from callsite to template decorator PiperOrigin-RevId: 228771063 GitOrigin-RevId: 70b243f160a2f0f222066f62e06cc4346aea683d Change-Id: I5f8cd05685ff642eff81187b8e207a0bdbcf073a
* Export of internal Abseil changes.Gravatar Abseil Team2018-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 07575526242a8e1275ac4223a3d2822795f46569 by CJ Johnson <johnsoncj@google.com>: Comment cleanup on InlinedVector PiperOrigin-RevId: 221322176 -- 49a5e643f85e34d53c41f5e6cc33357c55c9115d by Matt Kulukundis <kfm@google.com>: Internal cleanup PiperOrigin-RevId: 221309185 -- bb35be87ec9c74244b7d902e7e7d2d33ab139d76 by Abseil Team <absl-team@google.com>: Fix typo in comment. PiperOrigin-RevId: 221145354 -- afd4d7c106919708004e06aeea068a57c28aec44 by Derek Mauro <dmauro@google.com>: Update the debugging log message in CallOnceImpl() PiperOrigin-RevId: 221103254 -- 0b9dace8b88113777bf26a6d38f9bc0bcaf053a1 by Abseil Team <absl-team@google.com>: Workaround an MSVC 2015 bug in compile-time initialization. PiperOrigin-RevId: 220871483 -- ea0a3854511ed26beab827e5a5113766b334db86 by Marek Gilbert <mcg@google.com>: Fix ABSL_HAVE_THREAD_LOCAL when compiling for iOS 8 with Xcode 10. Xcode 10 has moved the check for thread_local to a link time, so clang reports __has_feature(cxx_thread_local) but then linking fails with messages like this: ld: targeted OS version does not support use of thread local variables PiperOrigin-RevId: 220815885 -- 485b6876c158c3dcf37eb32d7e512242d5d4ecc6 by Greg Falcon <gfalcon@google.com>: Make the absl::c_set_xxxx() algorithms refuse to compile when passed an unordered collection from std:: or absl::. These algorithms operate on sorted sequences; passing an unordered container to them is nearly certainly a bug. This change is technically an API break, but it only breaks incorrect code. We could try to be more clever and detect unordered collections from other libraries, but false positives will break legal code, and this would constitute an API break Abseil cannot afford. PiperOrigin-RevId: 220794190 -- c47cff7f9cc70a4c1604eee0131af552f40e46d6 by Jon Cohen <cohenjon@google.com>: MSVC 2017's STL throws a Structured Exception (not a C++ exception, essentially equivalent to SIGSEGV) when variant::emplace calls a throwing constructor when using the debug multithreaded MSVC runtime DLL. This manifests in dbg mode in Bazel builds. Disable tests which trigger this bug. It's impossible to specifically pull out MSVC 2017 -dbg modes because there's no way for Bazel to know when version of MSVC is being used -- you tell Bazel the directory where the MSVC tools live, not which version of MSVC tools to use. Thus the best we can do is switch on _DEBUG, which is set whenever the debug runtime is selected with the /MDd build flag, as in Bazel -dbg modes. See https://msdn.microsoft.com/en-us/library/b0084kay.aspx ctrl-f "_DEBUG" PiperOrigin-RevId: 220706161 -- 43993d4af309d92f4ebff38391dcc245f154ecc7 by Shaindel Schwartz <shaindel@google.com>: Internal change PiperOrigin-RevId: 220688429 -- 2448802972dcc261af153af464f2b022ef54a2a9 by Abseil Team <absl-team@google.com>: Speed up operator* for uint128 in WIN64. PiperOrigin-RevId: 220678790 -- 7b376403dd05ba10152fb52e40b29d8af79b58bb by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 220654834 -- ae08af58111c3f838b8d4de25f501c3559c86002 by Abseil Team <absl-team@google.com>: CMake: Add absl_cc_test function PiperOrigin-RevId: 220603940 GitOrigin-RevId: 07575526242a8e1275ac4223a3d2822795f46569 Change-Id: Iba7f53eb394c8a9de564582a976793f9bb0596d9
* Export of internal Abseil changes.Gravatar Abseil Team2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4e043a11b4c10a24e84046827ee16f47e11e35cc by Abseil Team <absl-team@google.com>: Merge of https://github.com/abseil/abseil-cpp/pull/136 PiperOrigin-RevId: 218197648 -- e61f06e1e601061a443feaa8c5207c52437bd641 by Abseil Team <absl-team@google.com>: Don't include <iostream> into int128, it's wasteful Including iostream emits a global constructor for initializing std::cout and friends, which isn't actually used by this file. PiperOrigin-RevId: 218156386 -- 8a6c82396e4c956be7f285328aec131cb4965f16 by Xiaoyi Zhang <zhangxy@google.com>: Fix MSVC compiler warnings on discarding return values of functions with 'nodiscard' attribute. PiperOrigin-RevId: 217883401 -- abf3e3a0f22bc4070df9dbc9a4ef4d883ed686bf by Tom Manshreck <shreck@google.com>: Update public README to add new libraries PiperOrigin-RevId: 217879399 -- 43b3b420a4e861711abbfbd497b8f2b3de17ec8c by Abseil Team <absl-team@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 217780963 -- 1c8831947ca6a65a63842e6bd5f37a7c102a4e1b by Abseil Team <absl-team@google.com>: Fix typo in a comment (missing comma in usage example). PiperOrigin-RevId: 217776645 GitOrigin-RevId: 4e043a11b4c10a24e84046827ee16f47e11e35cc Change-Id: I8999ae928da7a0030b4ecfd8d13da8522fdd013a
* Export of internal Abseil changes.Gravatar Abseil Team2018-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | -- c1f3a243ff3713917eaf0255c86ddd1b40461ba9 by Abseil Team <absl-team@google.com>: Remove stray space. PiperOrigin-RevId: 207753171 -- 4abe43b174f7fafa390d2f6eb96f31977a38fc69 by Shaindel Schwartz <shaindel@google.com>: Typo fix. PiperOrigin-RevId: 207572868 -- e7757b409256b025cadba20a84a93cb9dc4319e1 by Abseil Team <absl-team@google.com>: Adds backported is_(copy|move)_assignable<T> PiperOrigin-RevId: 207572180 GitOrigin-RevId: c1f3a243ff3713917eaf0255c86ddd1b40461ba9 Change-Id: I1202715e5092b54d5967017728044715d6eb2ec0
* - 3a9532fb2d6ae45c3cba44c9bb0dbdfc1558b7d3 Fix the description of ↵Gravatar Abseil Team2018-04-24
| | | | | | | | | | | Span::subspan(). by Abseil Team <absl-team@google.com> - bae1a1c21924bd31fa7315eff05ea6158d9e7947 Port the symbolizer to Windows. by Derek Mauro <dmauro@google.com> - 2253c04c1a4f39d9581772f1dc4491878aa3831f Support absl::Hex() and absl::Dec() as arguments to absl:... by Jorg Brown <jorg@google.com> - 552c3ac259e9c254fda9244755487f3423d2fe4b Internal change by Jorg Brown <jorg@google.com> GitOrigin-RevId: 3a9532fb2d6ae45c3cba44c9bb0dbdfc1558b7d3 Change-Id: I448133c9bb6d837037c12b45a9a16a7945049453
* - 551e205ef49682a1cb7e6e0cda46957fbcf88edd Release absl::variant. by ↵Gravatar Abseil Team2018-04-20
Xiaoyi Zhang <zhangxy@google.com> - 01c52f640594d073c6e54c47e7853b25522cf085 Update comments in absl::variant (and minor changes to ab... by Tom Manshreck <shreck@google.com> - 064465e1e6b158abd8c38fd1942b4fc464b57d6a Documentation change. by Abseil Team <absl-team@google.com> - 58df2c8a27e80c9ea21d87c1acee8019246377c9 Relocates SetCountdown and UnsetCountdown to the exceptio... by Abseil Team <absl-team@google.com> - fd9d248d0948d472f2543f7fd9c0ae4a1cd60d01 Clarify thread_annotation.h documentation around local va... by Abseil Team <absl-team@google.com> - 0d0abaf7f0945ac5f2c5f49e78afe1b326d5aca0 Typo fix in comments. by Abseil Team <absl-team@google.com> - 67286d587cbd07508a81e5b8147c245a5b5538b4 Internal change. by Xiaoyi Zhang <zhangxy@google.com> GitOrigin-RevId: 551e205ef49682a1cb7e6e0cda46957fbcf88edd Change-Id: I1a343b080187293cb5f892a309618b5712e7aa14