mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
Inline absl::void_t to std::void_t wherever possible
This won't replace all call sites, but that's fine. We only want to replace the call sites that compile fine, since they don't need to use absl::void_t. PiperOrigin-RevId: 896017307 Change-Id: I7e78066dc973e135922b11fba5c7642563ef6a67
This commit is contained in:
committed by
Copybara-Service
parent
e7c47687fe
commit
eb76981586
@@ -104,11 +104,13 @@ struct is_detected : is_detected_impl<void, Op, Args...>::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 <typename... Ts>
|
||||
using void_t = typename type_traits_internal::VoidTImpl<Ts...>::type;
|
||||
using void_t ABSL_REFACTOR_INLINE =
|
||||
typename type_traits_internal::VoidTImpl<Ts...>::type;
|
||||
|
||||
// Historical note: Abseil once provided implementations of these type traits
|
||||
// for platforms that lacked full support. New code should prefer to use the
|
||||
|
||||
Reference in New Issue
Block a user