STL Memory Versioning
Public Member Functions | List of all members
vs::vs_tree_strategy< _Key, _Comp > Class Template Reference

simpliest determenistic merge strategy. More...

#include <vs_tree.h>

Public Member Functions

void merge (_vs_tree< _Key, _Comp > &dst, _vs_tree< _Key, _Comp > &src)
 
void merge_same_element (_vs_tree< _Key, _Comp > &dst, _Key &dstk, _Key &srck)
 

Detailed Description

template<typename _Key, typename _Comp>
class vs::vs_tree_strategy< _Key, _Comp >

simpliest determenistic merge strategy.

On merge, puts everything from one stack to other. It is expected to start with empty stacks and merge remainders, or for user to override this strategy.

Definition at line 583 of file vs_tree.h.

Member Function Documentation

◆ merge()

template<typename _Key , typename _Comp >
void vs::vs_tree_strategy< _Key, _Comp >::merge ( _vs_tree< _Key, _Comp > &  dst,
_vs_tree< _Key, _Comp > &  src 
)
inline

Definition at line 588 of file vs_tree.h.

589  {
590  for (auto& i: src)
591  {
592  auto found = dst.find(i);
593  if (found != dst.end())
594  merge_same_element(dst, *found, i);
595  else
596  dst.push(i);
597  }
598  }
void merge_same_element(_vs_tree< _Key, _Comp > &dst, _Key &dstk, _Key &srck)
Definition: vs_tree.h:601

◆ merge_same_element()

template<typename _Key , typename _Comp >
void vs::vs_tree_strategy< _Key, _Comp >::merge_same_element ( _vs_tree< _Key, _Comp > &  dst,
_Key &  dstk,
_Key &  srck 
)
inline

Definition at line 601 of file vs_tree.h.

602  {
603  /* pretend we didnt saw new elements */
604  }

The documentation for this class was generated from the following file: