On 10/23/24 4:30 PM, Patrick Palka wrote:
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look
OK for trunk?

-- >8 --

This tree code was added as part of the initial Concepts TS
implementation to support type-constraints introducing any kind
of template-parameter, not just type template-parameters, e.g.

   template<int N> concept C = ...;
   template<template<class> class TT> concept D = ...;

   template<C T, D U> void f(); // T is an NTTP of type int, U is a TTP

When resolving the type-constraint we would use WILDCARD_DECL as the
dummy first argument during template argument coercion that is a valid
argument for any kind of template parameter.

But Concepts TS support has been removed, and C++20 type-constraints are
restricted to only introduce type template-parameters, and so we don't
need this catch-all WILDCARD_DECL anymore; we can instead use an auto
as the dummy first argument.

In passing introduce a helper for returning the prototype parameter
(i.e. first template parameter) of a concept and use it.

Ah, exactly what I was missing in the first patch; let's squash this patch together with that one. Then there's just the declares_constrained_type_template_parameter comment.

Jason

Reply via email to