erichkeane added a comment.

Comment based on @rsmith and EWG reflector feedback as to where this should be 
checked.



================
Comment at: clang/test/SemaTemplate/concepts.cpp:63
   template<typename T> concept C = true;
-  template<template<typename T> requires C<T> typename U> struct X {}; // 
expected-error {{requires 'class'}} expected-error 0+{{}}
+  template<template<typename T> requires C<T> typename U> struct X {};
   template<typename T> requires C<T> struct Y {};
----------------
Seemingly if "X" contains U<int>, the constraint should be checked (according 
to EWG).

Based on reflector conversations, it seems this should ALSO be checked in:

http://eel.is/c++draft/temp.arg.template#3
and 
http://eel.is/c++draft/temp.arg.template#4
, particularly the 'rewrite to function templates in /4 should produce a 
constrained function template, and the 'at least as specialized' check takes 
these into consideration.

They are ALSO considered in partial ordering.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110641/new/

https://reviews.llvm.org/D110641

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D110641: Implement P08... Erich Keane via Phabricator via cfe-commits

Reply via email to