dimanche 2 avril 2017

How to concat to existing ranges::view?

I want to use an existing view for concatenation. In code:

auto rng = view::empty<vector<int>>();

for(int i{0}; i < 5; ++i)
{
    vector<int> const & v{foo(r)}; // returns a reference
    rng |= view::concat(newRange); // doesn't compile - error: no viable overloaded '|='
};

Aucun commentaire:

Enregistrer un commentaire