Namespaces
Variants
Views
Actions

std::mergeable

From cppreference.com
< cpp‎ | iterator
 
 
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
mergeable
(C++20)
(C++20)
Utilities
Iterator adaptors
Stream iterators
Iterator customization points
Iterator operations
(C++11)
(C++11)
Range access
(C++11)(C++14)
(C++11)(C++14)
(C++17)(C++20)
(C++14)(C++14)
(C++14)(C++14)
(C++17)
(C++17)
 
Defined in header <iterator>
template< class I1, class I2, class Out, class R = ranges::less,

          class P1 = std::identity, class P2 = 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<R,
                                    std::projected<I1, P1>,

                                    std::projected<I2, P2>>;
(since C++20)

The mergeable concept specifies the requirements for algorithms that merge two input ranges into a single output range according to the strict weak ordering imposed by R.

[edit] Semantic requirements

mergeable is only if all concepts it subsumes are modeled.

[edit] See also

merges two sorted ranges
(niebloid) [edit]
computes the union of two sets
(niebloid) [edit]
computes the intersection of two sets
(niebloid) [edit]
computes the difference between two sets
(niebloid) [edit]
computes the symmetric difference between two sets
(niebloid) [edit]