Export of internal Abseil changes.

--
7672429b51fa4edc9e2386f3d6ead89a33e523c0 by Xiaoyi Zhang <zhangxy@google.com>:

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 <shaindel@google.com>:

Update date for LTS branch.

PiperOrigin-RevId: 201335133

--
9a8f41ddd0c75d5d2746141f61ba5736cfbde494 by Abseil Team <absl-team@google.com>:

Update bazel_toolchains to the latest commit.

PiperOrigin-RevId: 201231595

--
f6d5d5d08e638424073d0bc31bb4ed4d1ef512e2 by Tom Manshreck <shreck@google.com>:

Fix LTS wording, move to top level

PiperOrigin-RevId: 201054433
GitOrigin-RevId: 7672429b51fa4edc9e2386f3d6ead89a33e523c0
Change-Id: Id63a986870993889258f6364634a7880d226d187
This commit is contained in:
Abseil Team 2018-06-20 06:25:23 -07:00 committed by Shaindel Schwartz
parent bd40a41cc1
commit d89dba27e3
4 changed files with 29 additions and 36 deletions

View file

@ -4,10 +4,10 @@ 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 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 version of Abseil without interfering with other projects which may also, in
turn, use Abseil. (For more information about our releases, see the turn, use Abseil. (For more information about our releases, see the
[Abseil Release Management](https://abseil.io/about/releases) guide. [Abseil Release Management](https://abseil.io/about/releases) guide.)
## LTS Branches ## LTS Branches
The following lists LTS branches and the date they have been released: The following lists LTS branches and the dates on which they have been released:
* [LTS Branch June 18, 2018](https://github.com/abseil/abseil-cpp/tree/lts_2018_06_18/) * [LTS Branch June 20, 2018](https://github.com/abseil/abseil-cpp/tree/lts_2018_06_20/)

View file

@ -3,11 +3,11 @@ workspace(name = "com_google_absl")
http_archive( http_archive(
name = "bazel_toolchains", name = "bazel_toolchains",
urls = [ urls = [
"https://mirror.bazel.build/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/2cec6c9f6d12224e93d9b3f337b24e41602de3ba.tar.gz", "https://github.com/bazelbuild/bazel-toolchains/archive/287b64e0a211fb7c23b74695f8d5f5205b61f4eb.tar.gz",
], ],
strip_prefix = "bazel-toolchains-2cec6c9f6d12224e93d9b3f337b24e41602de3ba", strip_prefix = "bazel-toolchains-287b64e0a211fb7c23b74695f8d5f5205b61f4eb",
sha256 = "9b8d85b61d8945422e86ac31e4d4d2d967542c080d1da1b45364da7fd6bdd638", sha256 = "aca8ac6afd7745027ee4a43032b51a725a61a75a30f02cc58681ee87e4dcdf4b",
) )
# GoogleTest/GoogleMock framework. Used by most unit-tests. # GoogleTest/GoogleMock framework. Used by most unit-tests.

View file

@ -1100,49 +1100,40 @@ using EqualResult = decltype(std::declval<T>() == std::declval<T>());
template <class T> template <class T>
using NotEqualResult = decltype(std::declval<T>() != std::declval<T>()); using NotEqualResult = decltype(std::declval<T>() != std::declval<T>());
template <class T>
using HasLessThan = is_detected_convertible<bool, LessThanResult, T>;
template <class T>
using HasGreaterThan = is_detected_convertible<bool, GreaterThanResult, T>;
template <class T>
using HasLessThanOrEqual =
is_detected_convertible<bool, LessThanOrEqualResult, T>;
template <class T>
using HasGreaterThanOrEqual =
is_detected_convertible<bool, GreaterThanOrEqualResult, T>;
template <class T>
using HasEqual = is_detected_convertible<bool, EqualResult, T>;
template <class T>
using HasNotEqual = is_detected_convertible<bool, NotEqualResult, T>;
template <class... T> template <class... T>
using RequireAllHaveEqualT = using RequireAllHaveEqualT = absl::enable_if_t<
absl::enable_if_t<absl::conjunction<HasEqual<T>...>::value, bool>; absl::conjunction<is_detected_convertible<bool, EqualResult, T>...>::value,
bool>;
template <class... T> template <class... T>
using RequireAllHaveNotEqualT = using RequireAllHaveNotEqualT =
absl::enable_if_t<absl::conjunction<HasEqual<T>...>::value, bool>; absl::enable_if_t<absl::conjunction<is_detected_convertible<
bool, NotEqualResult, T>...>::value,
bool>;
template <class... T> template <class... T>
using RequireAllHaveLessThanT = using RequireAllHaveLessThanT =
absl::enable_if_t<absl::conjunction<HasLessThan<T>...>::value, bool>; absl::enable_if_t<absl::conjunction<is_detected_convertible<
bool, LessThanResult, T>...>::value,
bool>;
template <class... T> template <class... T>
using RequireAllHaveLessThanOrEqualT = using RequireAllHaveLessThanOrEqualT =
absl::enable_if_t<absl::conjunction<HasLessThan<T>...>::value, bool>; absl::enable_if_t<absl::conjunction<is_detected_convertible<
bool, LessThanOrEqualResult, T>...>::value,
bool>;
template <class... T> template <class... T>
using RequireAllHaveGreaterThanOrEqualT = using RequireAllHaveGreaterThanOrEqualT =
absl::enable_if_t<absl::conjunction<HasLessThan<T>...>::value, bool>; absl::enable_if_t<absl::conjunction<is_detected_convertible<
bool, GreaterThanOrEqualResult, T>...>::value,
bool>;
template <class... T> template <class... T>
using RequireAllHaveGreaterThanT = using RequireAllHaveGreaterThanT =
absl::enable_if_t<absl::conjunction<HasLessThan<T>...>::value, bool>; absl::enable_if_t<absl::conjunction<is_detected_convertible<
bool, GreaterThanResult, T>...>::value,
bool>;
// Helper template containing implementations details of variant that can't go // Helper template containing implementations details of variant that can't go
// in the private section. For convenience, this takes the variant type as a // in the private section. For convenience, this takes the variant type as a

View file

@ -445,9 +445,11 @@ constexpr bool operator!=(monostate, monostate) noexcept { return false; }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
template <typename T0, typename... Tn> template <typename T0, typename... Tn>
class variant<T0, Tn...> : private variant_internal::VariantBase<T0, Tn...> { class variant<T0, Tn...> : private variant_internal::VariantBase<T0, Tn...> {
// 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<T0>, std::is_object<Tn>..., static_assert(absl::conjunction<std::is_object<T0>, std::is_object<Tn>...,
absl::negation<std::is_array<T0>>, negation<std::is_array<T0> >,
absl::negation<std::is_array<Tn>>..., negation<std::is_array<Tn> >...,
std::is_nothrow_destructible<T0>, std::is_nothrow_destructible<T0>,
std::is_nothrow_destructible<Tn>...>::value, std::is_nothrow_destructible<Tn>...>::value,
"Attempted to instantiate a variant with an unsupported type."); "Attempted to instantiate a variant with an unsupported type.");