https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69784
--- Comment #3 from Csaba Osztrogonác ---
In WebKit project we had to submitted at least 2 workarounds due to this bug:
- https://bugs.webkit.org/show_bug.cgi?id=151622
- https://bugs.webkit.org/show_bug.cgi?id=154162
( side note: clang builds t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69784
--- Comment #2 from Csaba Osztrogonác ---
If we explicitly add the type of element, we get a different error:
main.cpp:10:18: error: ‘begin’ was not declared in this scope
for (int i : i)
^
main.cpp:10:18: note: suggested
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69784
Csaba Osztrogonác changed:
What|Removed |Added
Summary|Range-based for loop can|Range-based for loop can't
: unassigned at gcc dot gnu.org
Reporter: oszi at inf dot u-szeged.hu
Target Milestone: ---
#include
#include
using namespace std;
int main()
{
array i = {1,2,3,4,5};
for (auto& i : i)
{
cout << i <