Open Quuxplusone opened 4 years ago
Bugzilla Link | PR44538 |
Status | NEW |
Importance | P normal |
Reported by | Maciej Cencora (m.cencora@gmail.com) |
Reported on | 2020-01-14 02:56:01 -0800 |
Last modified on | 2021-10-26 05:09:56 -0700 |
Version | unspecified |
Hardware | All All |
CC | blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Still fails on clang 11.0.1 and trunk
I think the problem here is that we treat
Array{ <blah> }
as being a non-type-dependent expression, with type `Array`. As a consequence,
we reject the range-based for loop when parsing the template, even though the
instantiation is valid.
We're not following the standard rules here, but the standard rules are also
wrong. I've contacted the C++ committee about that. I'd suggest for now that we
say
T( <blah> )
T{ <blah> }
are type-dependent if either T is a dependent type or if T is an array of
unknown bound and <blah> is type-dependent.
Still fails on trunk.
Is there a CWG issue created for this?
Where can I find up-to-date CWG issues list? This one http://www.open-
std.org/jtc1/sc22/wg21/docs/cwg_active.html seems old (February 2021)