命名空间
变体
操作

std::mergeable

来自 cppreference.cn
< cpp‎ | iterator
 
 
迭代器库
迭代器概念
迭代器原语
算法概念和工具
间接可调用概念
通用算法要求
(C++20)
mergeable
(C++20)
(C++20)
工具
(C++20)
迭代器适配器
范围访问
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
定义于头文件 <iterator>
template< class I1, class I2, class Out, class Comp = ranges::less,

          class Proj1 = std::identity, class Proj2 = std::identity >
concept mergeable =
    std::input_iterator<I1> &&
    std::input_iterator<I2> &&
    std::weakly_incrementable<Out> &&
    std::indirectly_copyable<I1, Out> &&
    std::indirectly_copyable<I2, Out> &&
    std::indirect_strict_weak_order<Comp,
                                    std::projected<I1, Proj1>,

                                    std::projected<I2, Proj2>>;
(自 C++20 起)

mergeable 概念指定了算法的要求,这些算法根据 Comp 施加的严格弱序将两个输入范围合并为单个输出范围。

[编辑] 语义要求

仅当其包含的所有概念都被建模时,mergeable 才被建模。

[编辑] 参见

合并两个已排序的范围
(算法函数对象)[编辑]
计算两个集合的并集
(算法函数对象)[编辑]
计算两个集合的交集
(算法函数对象)[编辑]
计算两个集合的差集
(算法函数对象)[编辑]
计算两个集合的对称差
(算法函数对象)[编辑]