C++ std::C和x2B的插入器更换+;17

C++ std::C和x2B的插入器更换+;17,c++,c++17,inserter,C++,C++17,Inserter,在这方面: 设置交叉点使用std::inserter如下: std::set_intersection( netSet.begin(), netSet.end(), portSet.begin(), portSet.end(), std::inserter(result, result.end()) ); 但是,std::inserter不再适用于C++17,那么该如何重写此代码呢 编辑:正如许多人指出的,std::inserter在C++17中仍然可用。不知何故,我最

在这方面:
设置交叉点
使用
std::inserter
如下:

std::set_intersection(
    netSet.begin(), netSet.end(),
    portSet.begin(), portSet.end(),
    std::inserter(result, result.end())
);
但是,
std::inserter
不再适用于
C++17
,那么该如何重写此代码呢

编辑:正如许多人指出的,std::inserter在C++17中仍然可用。不知何故,我最终读到了std::iterator是如何被弃用的,却没有意识到它不是指std::inserter。我的问题是通过在我的代码中特别包含
头来解决的

std::inserter
不再适用于

那不是真的

没有迹象表明它将从C++17中删除,也没有迹象表明它将被弃用


我对
std::iterator

std::inserter
不再适用于

那不是真的

没有迹象表明它将从C++17中删除,也没有迹象表明它将被弃用


我对
std::iterator


.

您在哪里看到
std::inserter
将不可用?我认为它没有被删除,甚至没有被弃用。也许您正在考虑,它的本意是帮助您提供创建自己的迭代器时所需的
typedef
s,但被认为不是很有用,因此被弃用了?您在哪里看到
std::inserter
将不可用?我认为它没有被删除,甚至没有被弃用。也许您正在考虑,它的本意是帮助您提供创建自己的迭代器时所需的
typedef
s,但被认为不是很有用,因此被弃用了?