http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57515
jos at vandenoever dot info changed:
What|Removed |Added
Resolution|INVALID |WORKSFORME
--- Comment #3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57515
--- Comment #1 from jos at vandenoever dot info ---
The first line of the code snippet was missing:
int some_list[]={ 1, 2, 3, 4, 5 };
int total = 0;
std::for_each(begin(some_list), end(some_list), [&total](int x) {
total += x;
});
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: jos at vandenoever dot info
Currently this code does not compile:
int total = 0;
std::for_each(begin(some_list), end(some_list), [&total](int x) {
total += x;
});
because begin() and end()