<div dir="ltr">Hey,<div>I'm working on our concepts implementation and am pretty close to finishing the implementation. All that's left is requires-expressions which I have the code mostly written for, and am testing it now.</div><div>I came across a dilemma with requires-expressions and would like to know what you guys think should happen.</div><div>We have requires expressions which declare local parameters - parameters that need to be visible in the body of the requires-expression. The current machinery would require such decls to reside in a declcontext which itself should be a decl as it stands today.</div><div>Should requires-expr therefore be an expression linked to a generated decl? The closest existing thing to this would be a lambda expression, but lambda expressions cannot appear in unevaluated contexts while requires-expressions clearly can.</div><div>Also, requires expressions as I have them now can contain another kind of declaration - when using a constrained-parameter requirement (e.g. requires {{ 0 } -> Same<int>;} ), a template parameter list with one parameter is generated.</div><div><br></div><div>My initial thought seems to indicate a "RequiresExprBodyDecl : Decl, DeclContext" is requires here, but I may be missing some implications of this right now - are there any inherent problems with having this sort of declaration generated here?</div><div><br></div><div>Thanks :)</div>
</div>