<div dir="ltr">Thanks Hubert,<div><br></div><div>Let me first get to grips with working on the Clang source and familiarise myself with current Concepts spec then I'll see where I can contribute most usefully.</div><div><br></div><div>Cheers,</div><div>Andrew.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 14, 2016 at 7:21 PM Hubert Tong <<a href="mailto:hubert.reinterpretcast@gmail.com">hubert.reinterpretcast@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Andrew,<br><br>I have an idea of the dependencies behind the various part of the work and could hopefully help coordinate the implementation effort.<br>Brain dump follows; please let me know what part of the implementation you are interested in. Note that Nathan may already have plans to work on certain things.<br><br>The implementation is still in its early stages. As Nathan mentioned, it is currently controlled by a cc1 flag -fconcepts-ts.<br><br>Broadly, there are various sides to the "core concepts" implementation.<br>One is allowing for constrained templates. Another is allowing for concept definitions. A third is requires-expressions.<br><br>Nathan Wilson has been implementing concept definitions.<br>The acceptance of "concept" as a specifier for that purpose has been implemented, as have various diagnostics associated with its use.<br>The last I know of, Nathan noted that there are still a few things that need to be completed on that front (such as 7.1.7 p3). The tests are under the tests/CXX/concepts.ts directory.<br><br>The presence of concept definitions lends itself to adding an implementation of constrained-parameters (at least the parsing is safe to do for now--see below for the state of representing constrained templates). I'm not a fan of template-introducers, but those are also in a similar state.<br><br>I suggest avoiding abbreviated function template syntax for now.<br><br>Since require-expressions are allowed in limited contexts, and a concept definition is one of them, it is also a great time to start work on requires-expressions.<br>I believe Nathan is planning to work on this.<br><br>For constrained templates, the idea is to first allow for requires-clauses in template-declarations.<br>The parsing for that is complete.<br><br>We still need to attach the parsed constraint-expression to the declaration.<br>I submitted patches to add a field to TemplateParameterList to allow the constraint-expression to flow from the Parser to the point where we create the declaration.<br>My next step is to attach constraints to declarations properly.<br><br>At this stage, the associated constraint (which is used for matching declarations) for the template would still be the same as the constraint-expression; however, as additional forms of constraining templates is added, this will change (and so different declarations of the same templated entity may syntactically have their constraints expressed differently). The canonical representation of the associated constraint is that specified by the TS (a single expression).<br><br>When we have the canonical representation attached to a declaration of the template, we can move forward with several things immediately.<br><br>The resolution of declarations to prior declarations will need to be done (which will involve comparison of template-dependent expressions)--this is the part I'm working towards.<br><br>Implementing mangling for the associated constraints is another.<br><br>Determining whether the associated constraint is satisfied is yet another.<br>This will involve normalizing the constraint into a form which, in terms of the implementation, will be conducive to doing the as-needed template argument substitution.<br>Once this is implemented, then triggering substitution failure when appropriate could be considered "cutting the ribbon".<br><br>There is more to do for the partial ordering and subsumption determination. Those work upon the normalized constraint. A theorem prover would be useful.<br><br></div></div><div dir="ltr">-- Hubert Tong<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 9:59 AM, Nathan Wilson <span dir="ltr"><<a href="mailto:nwilson20@gmail.com" target="_blank">nwilson20@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi Andrew,</p>
<p dir="ltr">There isn't a branch devoted to Concepts; patches are created and merged into trunk (master). If you look through the logs you'll see some commits with [Concepts] or [CONCEPTS] in the subject.</p>
<p dir="ltr">Currently there is a front end only (cc1 only)<br>
-fconcepts-ts flag which may be specified with -Xclang -fconcepts-ts as well.</p>
<p dir="ltr">Thanks,<br>
Nathan</p><div><div>
<div style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Hubert.<div><br></div><div>Is there a public branch available? I'd be interested in getting involved.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 14, 2016 at 1:40 PM Hubert Tong <<a href="mailto:hubert.reinterpretcast@gmail.com" target="_blank">hubert.reinterpretcast@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Andrew,<br><br></div>Concepts support is still ongoing in Clang. There is no published roadmap, but the goal is to have a full implementation (at least using the <i>requires-clause</i> syntax) in Spring of 2017.<br><br></div>-- HT<br></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 14, 2016 at 8:03 AM, Andrew Marshall via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What is the status of adding support for Concepts in Clang? Is there any kind of roadmap for this?<div><br></div><div>Thanks,</div><div>Andrew.</div></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></div>
</div></div></blockquote></div><br></div>
</blockquote></div>