首页 / 算法 / 转换算法 / remove |
template< typename Sequence , typename T , typename In = unspecified > struct remove { typedef unspecified type; };
返回一个新序列,其中包含 [ 中的所有元素begin<Sequence>::type, end<Sequence>::type) 范围,但那些与以下内容相同的除外T.
[注意:此措辞适用于算法的无插入器版本。有关算法在所有情况下的精确规范,请参见表达式语义子节——结束注释]
#include <boost/mpl/remove.hpp>
Parameter | 要求 | 描述 |
---|---|---|
序列 | Forward Sequence | 原始序列。 |
T | 任何类型 | 要删除的类型。 |
在 | Inserter | 一个插入器。 |
表达式的语义仅在与 可逆算法 不同或未在其中定义的地方定义。
对于任何 Forward Sequences,一个 Inserterin、和任意类型x:
typedef remove<s,x,in>::type r;
返回类型 | 一个类型。 |
---|---|
语义 | 等同于 typedef remove_if< s,is_same<_,x>,in >::type r; |