[PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 15:35:10 PST 2015


hubert.reinterpretcast added inline comments.

================
Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp:7
@@ +6,2 @@
+template<typename T>
+concept bool fcpi(int i = 0) { return true; } // expected-error {{function concept cannot have any parameters}}
----------------
hubert.reinterpretcast wrote:
> Do we diagnose for the following?
> template<typename... T>
> concept bool fcpp(T ...t) { return true; }
> 
> This is ill-formed as well since either [dcl.spec.concept]p5 is violated or [temp.res]p8 (same paragraph reference in C++14 as in N4527) is.
Also test:
template<typename T>
concept bool fcpva(...) { return true; }


http://reviews.llvm.org/D14352





More information about the cfe-commits mailing list