================ @@ -1257,4 +1256,35 @@ template <typename T> concept PerfectSquare = [](){} // expected-note 2{{here}} ([](auto) { return true; }) < PerfectSquare <class T>; // expected-error@-1 {{declaration of 'T' shadows template parameter}} \ // expected-error@-1 {{a concept definition cannot refer to itself}} + +} +namespace GH61811{ +template <class T> struct A { static const int x = 42; }; +template <class Ta> concept A42 = A<Ta>::x == 42; +template <class Tv> concept Void = __is_same_as(Tv, void); +template <class Tb, class Ub> concept A42b = Void<Tb> || A42<Ub>; +template <class Tc> concept R42c = A42b<Tc, Tc&>; +static_assert (R42c<void>); +} + +namespace parameter_mapping_regressions { + +namespace case1 { + +template <template <class> class> using __meval = struct __q; +template <template <class> class _Tp> +concept __mvalid = requires { typename __meval<_Tp>; }; +template <class _Fn> +concept __minvocable = __mvalid<_Fn::template __f>; +template <class...> struct __mdefer_; +template <class _Fn, class... _Args> + requires __minvocable<_Fn> +struct __mdefer_<_Fn, _Args...> {}; +template <class = __q> struct __mtransform { + template <class> using __f = int; +}; +struct __completion_domain_or_none_ : __mdefer_<__mtransform<>> {}; + +} ---------------- mizvekov wrote:
I see, it'd be unfortunate to remove that assert, as it helped catch many bugs. I'll take a better look at this. https://github.com/llvm/llvm-project/pull/141776 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits