[PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

Nathan Wilson via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 14:39:48 PST 2015


nwilson added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:7659
@@ +7658,3 @@
+        Diag(D.getDeclSpec().getConceptSpecLoc(),
+             diag::err_concept_specified_specialization) << 1;
+      }
----------------
rsmith wrote:
> hubert.reinterpretcast wrote:
> > nwilson wrote:
> > > hubert.reinterpretcast wrote:
> > > > I don't think the declaration should still be marked as a concept in this case.
> > > Hmm, Richard - did you have any thoughts about this? IIRC, we might be okay here by only looking at the concept flag of the primary template.
> > A consideration:
> > When processing the body associated with the specialization, should the requirements for a function concept body be checked?
> I think the `concept` flag logically belongs on the template declaration rather than on the templated declaration; moving it there would make this question irrelevant =)
Sorry for the slow reply.

Okay. That makes sense. So, we'd be okay putting the IsConcept bit (and the associated member functions) in TemplateDecl then?

You'd be okay with the extra byte used?


http://reviews.llvm.org/D13357





More information about the cfe-commits mailing list