Commit c0293693 authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Patch to avoid -Wundef error in the WebRTC build.

The fix has been upstreamed and it will be rolled as soon as Abseil
rolls into //third_party/abseil-cpp.

Bug: None
Change-Id: Ifd5e17c30b021518f09d81ad60da919303d5e6ee
Reviewed-on: https://chromium-review.googlesource.com/c/1335927
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: default avatarMarina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607988}
parent e7f70c16
......@@ -303,13 +303,13 @@ H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence<Is...>) {
// AbslHashValue for hashing tuples
template <typename H, typename... Ts>
#if _MSC_VER
#if defined(_MSC_VER)
// This SFINAE gets MSVC confused under some conditions. Let's just disable it
// for now.
H
#else
#else // _MSC_VER
typename std::enable_if<absl::conjunction<is_hashable<Ts>...>::value, H>::type
#endif
#endif // _MSC_VER
AbslHashValue(H hash_state, const std::tuple<Ts...>& t) {
return hash_internal::hash_tuple(std::move(hash_state), t,
absl::make_index_sequence<sizeof...(Ts)>());
......@@ -536,7 +536,7 @@ hash_range_or_bytes(H hash_state, const T* data, size_t size) {
// In MSVC we can't probe std::hash or stdext::hash because it triggers a
// static_assert instead of failing substitution.
#if defined(_MSC_VER)
#undef ABSL_HASH_INTERNAL_CAN_POISON_
#define ABSL_HASH_INTERNAL_CAN_POISON_ 0
#else // _MSC_VER
#define ABSL_HASH_INTERNAL_CAN_POISON_ 1
#endif // _MSC_VER
......@@ -544,6 +544,8 @@ hash_range_or_bytes(H hash_state, const T* data, size_t size) {
#if defined(ABSL_INTERNAL_LEGACY_HASH_NAMESPACE) && \
ABSL_HASH_INTERNAL_CAN_POISON_
#define ABSL_HASH_INTERNAL_SUPPORT_LEGACY_HASH_ 1
#else
#define ABSL_HASH_INTERNAL_SUPPORT_LEGACY_HASH_ 0
#endif
enum class InvokeHashTag {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment