libDwm-0.9.45
DwmDiff.hh File Reference

Dwm::Diff function templates. More...

#include <algorithm>
#include <type_traits>
Include dependency graph for DwmDiff.hh:

Go to the source code of this file.

Functions

template<class InputIt1 , class InputIt2 , class OutputCont >
void Dwm::Diff (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputCont &in1not2, OutputCont &in2not1)
 Copies elements from the sorted range [first1,last1) which are not found in the sorted range [first2,last2) to in1not2.
 
template<class InputIt1 , class InputIt2 , class OutputCont , class Compare >
void Dwm::Diff (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputCont &in1not2, OutputCont &in2not1, Compare comp)
 Copies elements from the sorted range [first1,last1) which are not found in the sorted range [first2,last2) to in1not2, using comp to compare elements.
 
template<class InputCont , class OutputCont >
void Dwm::Diff (const InputCont &in1, const InputCont &in2, OutputCont &in1not2, OutputCont &in2not1)
 Copies elements from the sorted container in1 which are not found in the sorted container in2 to in1not2.
 
template<class InputCont , class OutputCont , class Compare >
void Dwm::Diff (const InputCont &in1, const InputCont &in2, OutputCont &in1not2, OutputCont &in2not1, Compare comp)
 Copies elements from the sorted container in1 which are not found in the sorted container in2 to in1not2, using comp to compare elements.
 

Detailed Description

Dwm::Diff function templates.

Function Documentation

◆ Diff() [1/4]

template<class InputCont , class OutputCont >
void Dwm::Diff ( const InputCont & in1,
const InputCont & in2,
OutputCont & in1not2,
OutputCont & in2not1 )

Copies elements from the sorted container in1 which are not found in the sorted container in2 to in1not2.

Copies elements from the sorted container in2 which are not found in the sorted container in1 to in2not1. Note that I do not clear in1not2 or in2not1 on input, I simply append to the end of these containers.

Here is the call graph for this function:

◆ Diff() [2/4]

template<class InputCont , class OutputCont , class Compare >
void Dwm::Diff ( const InputCont & in1,
const InputCont & in2,
OutputCont & in1not2,
OutputCont & in2not1,
Compare comp )

Copies elements from the sorted container in1 which are not found in the sorted container in2 to in1not2, using comp to compare elements.

Copies elements from the sorted container in2 which are not found in the sorted container in1 to in2not1, using comp to compare elements. Note that I do not clear in1not2 or in2not1 on input, I simply append to the end of these containers.

Here is the call graph for this function:

◆ Diff() [3/4]

template<class InputIt1 , class InputIt2 , class OutputCont >
void Dwm::Diff ( InputIt1 first1,
InputIt1 last1,
InputIt2 first2,
InputIt2 last2,
OutputCont & in1not2,
OutputCont & in2not1 )

Copies elements from the sorted range [first1,last1) which are not found in the sorted range [first2,last2) to in1not2.

Copies elements from the sorted range [first2,last2) which are not
found in the sorted range [first1,last1) to in2not1. Note that I don't clear in1not2 or in1not2. Note that I do not clear in1not2 or in2not1 on input, I simply append to the end of these containers.

Here is the call graph for this function:

◆ Diff() [4/4]

template<class InputIt1 , class InputIt2 , class OutputCont , class Compare >
void Dwm::Diff ( InputIt1 first1,
InputIt1 last1,
InputIt2 first2,
InputIt2 last2,
OutputCont & in1not2,
OutputCont & in2not1,
Compare comp )

Copies elements from the sorted range [first1,last1) which are not found in the sorted range [first2,last2) to in1not2, using comp to compare elements.

Copies elements from the sorted range [first2,last2) which are not found in the sorted range [first1,last1) to in2not1, using comp to compare elements. Note that I do not clear in1not2 or in2not1 on input, I simply append to the end of these containers.

Here is the call graph for this function: