ghjang / rocky

C++ Library
1 stars 0 forks source link

[rocky/et] assignment lambda expression is not working correctly. #1

Closed ghjang closed 7 years ago

ghjang commented 7 years ago

For an example, following test case fails:

TEST_CASE("assignment lambda expression", "[et]")
{
    std::vector<int> v(5);
    std::iota(v.begin(), v.end(), 1);

    std::for_each(v.begin(), v.end(), _1 += 10);

    std::ostringstream oss;
    std::for_each(v.begin(), v.end(), oss << _1 << ", ");

    // FIXME
    REQUIRE(oss.str() == "11, 12, 13, 14, 15, ");
}