Workaround bug in GCC 7.2

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83830.
Before GCC 7.4, __cpp_lib_has_unique_object_representations was defined
but has_unique_object_representations_v was not.
pull/1250/head
Jonathan Conder 2 years ago
parent 697acabc5b
commit 0335c3d2a0
  1. 2
      absl/hash/internal/hash.h

@ -444,7 +444,7 @@ H AbslHashValue(H hash_state, T C::* ptr) {
// On other platforms, we assume that pointers-to-members do not have
// padding.
#ifdef __cpp_lib_has_unique_object_representations
static_assert(std::has_unique_object_representations_v<T C::*>);
static_assert(std::has_unique_object_representations<T C::*>::value);
#endif // __cpp_lib_has_unique_object_representations
return n;
#endif

Loading…
Cancel
Save