From d89dba27e35462d7457121b978fd79214205e686 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 20 Jun 2018 06:25:23 -0700 Subject: Export of internal Abseil changes. -- 7672429b51fa4edc9e2386f3d6ead89a33e523c0 by Xiaoyi Zhang : Work around a bug in MSVC 2015 which causes compiler error when building variant_test with inline namespace for the LTS release. The bug is reduced to https://godbolt.org/g/hvqDVz. PiperOrigin-RevId: 201343049 -- dfe4f3869aa4b70dda69631816103e7b2c53c593 by Shaindel Schwartz : Update date for LTS branch. PiperOrigin-RevId: 201335133 -- 9a8f41ddd0c75d5d2746141f61ba5736cfbde494 by Abseil Team : Update bazel_toolchains to the latest commit. PiperOrigin-RevId: 201231595 -- f6d5d5d08e638424073d0bc31bb4ed4d1ef512e2 by Tom Manshreck : Fix LTS wording, move to top level PiperOrigin-RevId: 201054433 GitOrigin-RevId: 7672429b51fa4edc9e2386f3d6ead89a33e523c0 Change-Id: Id63a986870993889258f6364634a7880d226d187 --- LTS.md | 13 +++++++++++++ WORKSPACE | 8 ++++---- absl/LTS.md | 13 ------------- absl/types/internal/variant.h | 45 +++++++++++++++++-------------------------- absl/types/variant.h | 6 ++++-- 5 files changed, 39 insertions(+), 46 deletions(-) create mode 100644 LTS.md delete mode 100644 absl/LTS.md diff --git a/LTS.md b/LTS.md new file mode 100644 index 0000000..385b4f0 --- /dev/null +++ b/LTS.md @@ -0,0 +1,13 @@ +# Long Term Support (LTS) Branches + +This repository contains periodic snapshots of the Abseil codebase that are +Long Term Support (LTS) branches. An LTS branch allows you to use a known +version of Abseil without interfering with other projects which may also, in +turn, use Abseil. (For more information about our releases, see the +[Abseil Release Management](https://abseil.io/about/releases) guide.) + +## LTS Branches + +The following lists LTS branches and the dates on which they have been released: + +* [LTS Branch June 20, 2018](https://github.com/abseil/abseil-cpp/tree/lts_2018_06_20/) diff --git a/WORKSPACE b/WORKSPACE index 89a80bb..a7b1c13 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -3,11 +3,11 @@ workspace(name = "com_google_absl") http_archive( name = "bazel_toolchains", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/2cec6c9f6d12224e93d9b3f337b24e41602de3ba.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/archive/2cec6c9f6d12224e93d9b3f337b24e41602de3ba.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/287b64e0a211fb7c23b74695f8d5f5205b61f4eb.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/287b64e0a211fb7c23b74695f8d5f5205b61f4eb.tar.gz", ], - strip_prefix = "bazel-toolchains-2cec6c9f6d12224e93d9b3f337b24e41602de3ba", - sha256 = "9b8d85b61d8945422e86ac31e4d4d2d967542c080d1da1b45364da7fd6bdd638", + strip_prefix = "bazel-toolchains-287b64e0a211fb7c23b74695f8d5f5205b61f4eb", + sha256 = "aca8ac6afd7745027ee4a43032b51a725a61a75a30f02cc58681ee87e4dcdf4b", ) # GoogleTest/GoogleMock framework. Used by most unit-tests. diff --git a/absl/LTS.md b/absl/LTS.md deleted file mode 100644 index f7be099..0000000 --- a/absl/LTS.md +++ /dev/null @@ -1,13 +0,0 @@ -# Long Term Support (LTS) Branches - -This repository contains periodic snapshots of the Abseil codebase that are -Long Term Support (LTS) branches. An LTS branch allows you to use a known -version of Abseil without interfering with other projects which may also, in -turn, use Abseil. (For more information about our releases, see the -[Abseil Release Management](https://abseil.io/about/releases) guide. - -## LTS Branches - -The following lists LTS branches and the date they have been released: - -* [LTS Branch June 18, 2018](https://github.com/abseil/abseil-cpp/tree/lts_2018_06_18/) diff --git a/absl/types/internal/variant.h b/absl/types/internal/variant.h index 94c2dda..3414c91 100644 --- a/absl/types/internal/variant.h +++ b/absl/types/internal/variant.h @@ -1100,49 +1100,40 @@ using EqualResult = decltype(std::declval() == std::declval()); template using NotEqualResult = decltype(std::declval() != std::declval()); -template -using HasLessThan = is_detected_convertible; - -template -using HasGreaterThan = is_detected_convertible; - -template -using HasLessThanOrEqual = - is_detected_convertible; - -template -using HasGreaterThanOrEqual = - is_detected_convertible; - -template -using HasEqual = is_detected_convertible; - -template -using HasNotEqual = is_detected_convertible; - template -using RequireAllHaveEqualT = - absl::enable_if_t...>::value, bool>; +using RequireAllHaveEqualT = absl::enable_if_t< + absl::conjunction...>::value, + bool>; template using RequireAllHaveNotEqualT = - absl::enable_if_t...>::value, bool>; + absl::enable_if_t...>::value, + bool>; template using RequireAllHaveLessThanT = - absl::enable_if_t...>::value, bool>; + absl::enable_if_t...>::value, + bool>; template using RequireAllHaveLessThanOrEqualT = - absl::enable_if_t...>::value, bool>; + absl::enable_if_t...>::value, + bool>; template using RequireAllHaveGreaterThanOrEqualT = - absl::enable_if_t...>::value, bool>; + absl::enable_if_t...>::value, + bool>; template using RequireAllHaveGreaterThanT = - absl::enable_if_t...>::value, bool>; + absl::enable_if_t...>::value, + bool>; // Helper template containing implementations details of variant that can't go // in the private section. For convenience, this takes the variant type as a diff --git a/absl/types/variant.h b/absl/types/variant.h index 5837a1b..55017ae 100644 --- a/absl/types/variant.h +++ b/absl/types/variant.h @@ -445,9 +445,11 @@ constexpr bool operator!=(monostate, monostate) noexcept { return false; } //------------------------------------------------------------------------------ template class variant : private variant_internal::VariantBase { + // Intentionally not qualifing `negation` with `absl::` to work around a bug + // in MSVC 2015 with inline namespace and variadic template. static_assert(absl::conjunction, std::is_object..., - absl::negation>, - absl::negation>..., + negation >, + negation >..., std::is_nothrow_destructible, std::is_nothrow_destructible...>::value, "Attempted to instantiate a variant with an unsupported type."); -- cgit v1.2.3