Namespaces
Variants

std:: mergeable

From cppreference.net
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
mergeable
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(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 仅在它所蕴含的所有概念都被建模时才会被建模。

参见

合并两个有序范围
(算法函数对象)
计算两个集合的并集
(算法函数对象)
计算两个集合的交集
(算法函数对象)
计算两个集合的差集
(算法函数对象)
计算两个集合的对称差集
(算法函数对象)