@@ -465,10 +465,9 @@ template <class T, class... Args>
465465using accessor_t = typename a11y_traits<void , T, Args...>::type;
466466
467467template <class C , class F , class ... Os>
468- struct conv_traits_impl : inapplicable_traits {};
469- template <class C , class F , class ... Os>
470- requires (overload_traits<substituted_overload_t <Os, F>>::applicable && ...)
471- struct conv_traits_impl <C, F, Os...> : applicable_traits {
468+ struct conv_traits_impl {
469+ static_assert ((overload_traits<substituted_overload_t <Os, F>>::applicable &&
470+ ...));
472471 using meta =
473472 composite_meta<invocation_meta<F, C::is_direct, typename C::dispatch_type,
474473 substituted_overload_t <Os, F>>...>;
@@ -640,6 +639,12 @@ struct ptr_traits<P> : applicable_traits {};
640639template <class F >
641640struct ptr_traits <proxy<F>> : inapplicable_traits {};
642641
642+ template <class P >
643+ consteval bool diagnose_proxiable_pointer () {
644+ constexpr bool verdict = ptr_traits<P>::applicable;
645+ static_assert (verdict, " only pointer or pointer-like types are proxiable" );
646+ return verdict;
647+ }
643648template <class P , class F , std::size_t ActualSize, std::size_t MaxSize>
644649consteval bool diagnose_proxiable_size_too_large () {
645650 constexpr bool verdict = ActualSize <= MaxSize;
@@ -727,10 +732,7 @@ template <class F>
727732struct basic_facade_traits <F> : applicable_traits {};
728733
729734template <class F , class ... Cs>
730- struct facade_conv_traits_impl : inapplicable_traits {};
731- template <class F , class ... Cs>
732- requires (conv_traits<Cs, F>::applicable && ...)
733- struct facade_conv_traits_impl <F, Cs...> : applicable_traits {
735+ struct facade_conv_traits_impl {
734736 using conv_meta =
735737 composite_t <composite_meta<>, typename conv_traits<Cs, F>::meta...>;
736738 using conv_indirect_accessor =
@@ -772,11 +774,7 @@ struct facade_refl_traits_impl {
772774 (refl_traits<Rs>::template applicable_ptr<P> && ...);
773775};
774776template <class F >
775- struct facade_traits : inapplicable_traits {};
776- template <class F >
777- requires (instantiated_t <facade_conv_traits_impl, typename F::convention_types,
778- F>::applicable)
779- struct facade_traits <F>
777+ struct facade_traits
780778 : instantiated_t <facade_conv_traits_impl, typename F::convention_types, F>,
781779 instantiated_t <facade_refl_traits_impl, typename F::reflection_types, F> {
782780 using meta = composite_t <
@@ -797,7 +795,7 @@ struct facade_traits<F>
797795
798796 template <class P >
799797 static consteval void diagnose_proxiable () {
800- bool verdict = true ;
798+ bool verdict = diagnose_proxiable_pointer<P>() ;
801799 verdict &=
802800 diagnose_proxiable_size_too_large<P, F, sizeof (P), F::max_size>();
803801 verdict &=
@@ -819,7 +817,8 @@ struct facade_traits<F>
819817
820818 template <class P >
821819 static constexpr bool applicable_ptr =
822- sizeof (P) <= F::max_size && alignof (P) <= F::max_align &&
820+ ptr_traits<P>::applicable && sizeof (P) <= F::max_size &&
821+ alignof (P) <= F::max_align &&
823822 copyability_traits<P, F::copyability>::applicable &&
824823 relocatability_traits<P, F::relocatability>::applicable &&
825824 destructibility_traits<P, F::destructibility>::applicable &&
@@ -913,9 +912,8 @@ add_qualifier_t<proxy<F>, Q>
913912} // namespace details
914913
915914template <class P , class F >
916- concept proxiable = facade<F> && details::facade_traits<F>::applicable &&
917- details::ptr_traits<P>::applicable &&
918- details::facade_traits<F>::template applicable_ptr<P>;
915+ concept proxiable =
916+ facade<F> && details::facade_traits<F>::template applicable_ptr<P>;
919917
920918template <facade F>
921919class proxy_indirect_accessor
@@ -930,7 +928,6 @@ template <facade F>
930928class proxy : public details ::facade_traits<F>::direct_accessor,
931929 public details::inplace_ptr<proxy_indirect_accessor<F>> {
932930 friend struct details ::proxy_helper;
933- static_assert (details::facade_traits<F>::applicable);
934931
935932public:
936933 using facade_type = F;
0 commit comments