clang-concepts-monorepo icon indicating copy to clipboard operation
clang-concepts-monorepo copied to clipboard

range-v3 example doesn't compile

Open PetrKudr opened this issue 5 years ago • 3 comments

https://godbolt.org/z/3KQF-g

#include <iostream>
#include <vector>

#include <range/v3/numeric/accumulate.hpp>
#include <range/v3/view/iota.hpp>
#include <range/v3/view/take.hpp>
#include <range/v3/view/transform.hpp>
using std::cout;

int main()
{
    using namespace ranges;
    int sum = accumulate(views::ints(1, unreachable) | views::transform([](int i) {
                             return i * i;
                         }) | views::take(10),
                         0);
    // prints: 385
    cout << sum << '\n';
}

PetrKudr avatar Dec 18 '19 19:12 PetrKudr

GCC ICEs: https://godbolt.org/z/zfyoaT.

JohelEGP avatar Dec 18 '19 19:12 JohelEGP

Trunk compiles this now: https://godbolt.org/z/JSFGbo

marehr avatar Feb 07 '20 23:02 marehr