diff --git a/absl/functional/internal/any_invocable.h b/absl/functional/internal/any_invocable.h index f353139c..35b389d1 100644 --- a/absl/functional/internal/any_invocable.h +++ b/absl/functional/internal/any_invocable.h @@ -683,23 +683,23 @@ using UnwrapStdReferenceWrapper = // An alias that always yields std::true_type (used with constraints) where // substitution failures happen when forming the template arguments. template -using True = +using TrueAlias = std::integral_constant*) != 0>; /*SFINAE constraints for the conversion-constructor.*/ template , AnyInvocable>::value>> -using CanConvert = - True>::value>, - absl::enable_if_t::template CallIsValid::value>, - absl::enable_if_t< - Impl::template CallIsNoexceptIfSigIsNoexcept::value>, - absl::enable_if_t, F>::value>>; +using CanConvert = TrueAlias< + absl::enable_if_t>::value>, + absl::enable_if_t::template CallIsValid::value>, + absl::enable_if_t< + Impl::template CallIsNoexceptIfSigIsNoexcept::value>, + absl::enable_if_t, F>::value>>; /*SFINAE constraints for the std::in_place constructors.*/ template -using CanEmplace = True< +using CanEmplace = TrueAlias< absl::enable_if_t::template CallIsValid::value>, absl::enable_if_t< Impl::template CallIsNoexceptIfSigIsNoexcept::value>, @@ -709,19 +709,19 @@ using CanEmplace = True< template , AnyInvocable>::value>> -using CanAssign = - True::template CallIsValid::value>, - absl::enable_if_t< - Impl::template CallIsNoexceptIfSigIsNoexcept::value>, - absl::enable_if_t, F>::value>>; +using CanAssign = TrueAlias< + absl::enable_if_t::template CallIsValid::value>, + absl::enable_if_t< + Impl::template CallIsNoexceptIfSigIsNoexcept::value>, + absl::enable_if_t, F>::value>>; /*SFINAE constraints for the reference-wrapper conversion-assign operator.*/ template -using CanAssignReferenceWrapper = - True::template CallIsValid>::value>, - absl::enable_if_t::template CallIsNoexceptIfSigIsNoexcept< - std::reference_wrapper>::value>>; +using CanAssignReferenceWrapper = TrueAlias< + absl::enable_if_t< + Impl::template CallIsValid>::value>, + absl::enable_if_t::template CallIsNoexceptIfSigIsNoexcept< + std::reference_wrapper>::value>>; //////////////////////////////////////////////////////////////////////////////// // @@ -778,7 +778,7 @@ using CanAssignReferenceWrapper = \ /*SFINAE constraint to check if F is invocable with the proper signature*/ \ template \ - using CallIsValid = True inv_quals, P...>, \ std::is_same \ using CallIsNoexceptIfSigIsNoexcept = \ - True; \ + TrueAlias; \ \ /*Put the AnyInvocable into an empty state.*/ \ Impl() = default; \