I could not find a thing doing this. And I don't want to write it from scratch. Getting a range as output is ok too. What I need is the following:
const std::vector<int> v1{1, 2, 5, 5, 5, 9};
const std::vector<int> v2{2, 5, 7};
std::vector<int> diff;
std::set_difference(v1.begin(), v1.end(), v2.begin(), v2.end(),
std::inserter(diff, diff.begin()));
print(v1, "∖ ");
print(v2, "= ");
print(diff, "\n");
// yielding { 1 2 5 5 5 9 } ∖ { 2 5 7 } = { 1 5 5 9 }