https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118296
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #60043|0 |1
is obsolete| |
Attachment #60044|0 |1
is obsolete| |
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 60046
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60046&action=edit
Reduced all the way
clang errors out:
<source>:7:24: error: no viable overloaded operator[] for type 'Array'
7 | int json = Array{}[ { Key{} }, 1];
| ~~~~~~~^ ~~~~~~~~~~~~
<source>:2:19: note: candidate template ignored: substitution failure: deduced
incomplete pack <(no value), int> for template parameter 'Js:auto'
2 | constexpr int operator[](auto... Js) const
| ^ ~~
And replacing operator[] with a function f, GCC errors out with a similar error
message.