https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66092

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-10
                 CC|                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Andrew Sutton from comment #2)
> I think that this should be ill-formed.
> 
> template <typename T, typename U, typename... Args>
>   concept bool Same()
>   {
>     return decltype(check<T, U, Args...>())::value;
>   }
> 
> template <typename... Args>
> requires Same<Args...>()
>   void foo( Args... args ) {}
> 
> 
> Template constraint processing requires that flatten (inline) the check for
> Same<Args...>(), but I don't see how we can substitute a dependent argument
> pack into three distinct template parameters (T, U, and ...Args). 
> 
> The wording prohibiting this is missing in the TS.

Agreed, this is basically the same issue as core issue 1430 for alias
templates.  We can fix the crash on this testcase by adding concepts to the DR
1430 check in coerce_template_parms, but complain is tf_none at that point so
we don't get a helpful error message.  Any thoughts on that?  It seems to me
that we probably want to pass complain through the normalize/lift functions.

Is there something to address this in your latest draft?

Reply via email to