std::mergeable

< cpp‎ | iterator
在标头 <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 概念指定对于“按照 R 所施加的严格弱序归并两个输入范围到单个输出范围的算法”的要求。

语义要求

mergeable 仅若其所蕴含的所有概念均被实现才得以实现。

参阅

(C++20)
归并两个有序范围
(niebloid)
计算两个集合的并集
(niebloid)
计算两个集合的交集
(niebloid)
计算两个集合的差集
(niebloid)
计算两个集合的对称差
(niebloid)