4#ifndef TETL_ALGORITHM_SET_INTERSECTION_HPP
5#define TETL_ALGORITHM_SET_INTERSECTION_HPP
7#include <etl/_functional/less.hpp>
21template <
typename InputIt1,
typename InputIt2,
typename OutputIt,
typename Compare>
23set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest, Compare comp)
26 while (first1 != last1
and first2 != last2) {
27 if (comp(*first1, *first2)) {
30 if (
not comp(*first2, *first1)) {
39template <
typename InputIt1,
typename InputIt2,
typename OutputIt>
40constexpr auto set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest)
43 return etl::set_intersection(first1, last1, first2, last2, dest,
etl::
less());
constexpr auto set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest) -> OutputIt
Constructs a sorted range beginning at dest consisting of elements that are found in both sorted rang...
Definition set_intersection.hpp:40
constexpr auto set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt dest, Compare comp) -> OutputIt
Constructs a sorted range beginning at dest consisting of elements that are found in both sorted rang...
Definition set_intersection.hpp:23
Definition adjacent_find.hpp:9
Function object for performing comparisons. Unless specialised, invokes operator< on type T....
Definition less.hpp:15