In this post:
set_intersection uses std::inserter as follows:
std::set_intersection(
netSet.begin(), netSet.end(),
portSet.begin(), portSet.end(),
std::inserter(result, result.end())
);
However, std::inserter is no longer available with C++17 so how should this code be rewritten?
EDIT: As many have pointed out, std::inserter is still available in C++17. Somehow I ended up reading how std::iterator had been deprecated not realising that it wasn't referring to std::inserter. My problem was solved by specifically including the <iterator> header in my code.