[PATCH] D39284: Allow conditions to be decomposed with structured bindings
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 30 17:09:35 PDT 2017
rsmith added inline comments.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:696-698
+ // a for-range-declaration, or a condition in C++2a, but we parse it in more
+ // cases than that.
+ if (!D.mayHaveDecompositionDeclarator(getLangOpts())) {
----------------
lichray wrote:
> rsmith wrote:
> > Again, please don't guess what's going to be in C++2a. I would actually expect that we'll vote this in as a DR against C++17. It seems like a wording oversight to me.
> I would say, use DR with parsimony... But OK.
>
> OT: I'm writing a paper on `auto(x)` and `auto{x}` while implementing it. Do you expect this to land as a DR? In which form you expect it to appear in Clang?
For that one, I don't know. The status quo is inconsistent (particularly comparing `auto` to class template argument deduction), but I don't think the inconsistency is a wording oversight. If this were to land in Clang prior to being voted into C++2a, I'd expect it to produce an `ExtWarn` that's not tied to any particular C++ version.
https://reviews.llvm.org/D39284
More information about the cfe-commits
mailing list