[PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 20:25:29 PDT 2015


hubert.reinterpretcast added inline comments.

================
Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.concept/p7.cpp:4
@@ +3,3 @@
+template<typename T> concept bool VCEI { true };
+template concept bool VCEI<int>; // expected-error {{variable concept cannot be explicitly instantiated}}
+
----------------
This is not a declaration (never mind definition) of a function template or variable template, but of a specialization. Presumably, this violates [dcl.spec.concept]p1. Perhaps a test for p7 should omit the concept specifier? The same logic may apply to the explicit specialization cases.


http://reviews.llvm.org/D13357





More information about the cfe-commits mailing list