http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57515

jos at vandenoever dot info changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |WORKSFORME

--- Comment #3 from jos at vandenoever dot info ---
I've expanded the comment with #include and std::. It *does* compile now, so
the bug was invalid.

#include <algorithm>
#include <iostream>

int
main() {
    int some_list[]={ 1, 2, 3, 4, 5 };
    int total = 0;
    std::for_each(std::begin(some_list), std::end(some_list), [&total](int x) {
      total += x;
    });
    std::cout << total << std::endl;
    return 0;
}

Reply via email to