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:

```c++
    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 }
```
  • Are there some h... Ferhat Kurtulmuş via Digitalmars-d-learn
    • Re: Are the... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Are... Ferhat Kurtulmuş via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... Ali Çehreli via Digitalmars-d-learn
            • ... Ali Çehreli via Digitalmars-d-learn

Reply via email to