diff --git a/absl/meta/type_traits.h b/absl/meta/type_traits.h index 9013aead..bcc3a987 100644 --- a/absl/meta/type_traits.h +++ b/absl/meta/type_traits.h @@ -104,11 +104,13 @@ struct is_detected : is_detected_impl::type {}; // metafunction allows you to create a general case that maps to `void` while // allowing specializations that map to specific types. // -// This metafunction is not 100% compatible with the C++17 `std::void_t` -// metafunction. It has slightly different behavior, such as when ordering -// partial specializations. It is recommended to use `std::void_t` instead. +// This metafunction is a workaround for some implementations of `std::void_t` +// that evaluate to `void` prematurely, causing partial specializations to +// appear duplicated (and thus invalid) to the compiler prior to substitution +// taking place. Whenever possible, use `std::void_t` instead. template -using void_t = typename type_traits_internal::VoidTImpl::type; +using void_t ABSL_REFACTOR_INLINE = + typename type_traits_internal::VoidTImpl::type; // Historical note: Abseil once provided implementations of these type traits // for platforms that lacked full support. New code should prefer to use the