From 361cb8a9db2f2130442389fd80593255be26d681 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 10 Jun 2019 01:57:44 -0700 Subject: Export of internal Abseil changes. -- 4a21ad4ffa957d28b770de8717289fab7410f567 by Gennadiy Rozental : Internal cleanup PiperOrigin-RevId: 252366381 -- b6b0f25439549c54f1537a16625be1fecd3c7d8c by Xiaoyi Zhang : 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 : Adds new benchmarks for the constructors of InlinedVector PiperOrigin-RevId: 251905349 -- c65a08507917e9f8f6450b8beb235fe1426d7954 by CJ Johnson : 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 : 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 : Import of CCTZ from GitHub. PiperOrigin-RevId: 251739183 -- f51b115e0dc3fc9a9c9c20b33a1f27027a700d48 by Abseil Team : Import of CCTZ from GitHub. PiperOrigin-RevId: 251686812 -- 30e868049282dc6a6fc77d923ca7d2a5d35a1658 by Xiaoyi Zhang : Import of CCTZ from GitHub. PiperOrigin-RevId: 251652119 GitOrigin-RevId: 4a21ad4ffa957d28b770de8717289fab7410f567 Change-Id: I7171cb613793fa90e0eb0143b65ec8264a2a84db --- absl/types/internal/variant.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'absl/types/internal') diff --git a/absl/types/internal/variant.h b/absl/types/internal/variant.h index 5ca66e2902c6..85201b4ae1f9 100644 --- a/absl/types/internal/variant.h +++ b/absl/types/internal/variant.h @@ -837,8 +837,8 @@ struct ImaginaryFun, I> : ImaginaryFun, I + 1> { // NOTE: const& and && are used instead of by-value due to lack of guaranteed // move elision of C++17. This may have other minor differences, but tests // pass. - static SizeT Run(const H&); - static SizeT Run(H&&); + static SizeT Run(const H&, SizeT); + static SizeT Run(H&&, SizeT); }; // The following metafunctions are used in constructor and assignment @@ -860,7 +860,8 @@ struct ConversionIsPossibleImpl : std::false_type {}; template struct ConversionIsPossibleImpl< - Variant, T, void_t::Run(std::declval()))>> + Variant, T, + void_t::Run(std::declval(), {}))>> : std::true_type {}; template @@ -868,8 +869,9 @@ struct ConversionIsPossible : ConversionIsPossibleImpl::type {}; template struct IndexOfConstructedType< - Variant, T, void_t::Run(std::declval()))>> - : decltype(ImaginaryFun::Run(std::declval())) {}; + Variant, T, + void_t::Run(std::declval(), {}))>> + : decltype(ImaginaryFun::Run(std::declval(), {})) {}; template struct ContainsVariantNPos -- cgit 1.4.1