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

simpliest determenistic merge strategy. More...

#include <vs_stack.h>

Public Member Functions

void merge (std::stack< _Key > &dst, std::stack< _Key > &src)
 
void merge_same_element (std::stack< _Key > &dst, _Key &dstk, _Key &srck)
 

Detailed Description

template<typename _Key>
class vs::vs_stack_strategy< _Key >

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 136 of file vs_stack.h.

Member Function Documentation

◆ merge()

template<typename _Key >
void vs::vs_stack_strategy< _Key >::merge ( std::stack< _Key > &  dst,
std::stack< _Key > &  src 
)
inline

Definition at line 141 of file vs_stack.h.

142  {
143  while (src.size() > 0)
144  {
145  dst.push(src.top());
146  src.pop();
147  }
148  }

◆ merge_same_element()

template<typename _Key >
void vs::vs_stack_strategy< _Key >::merge_same_element ( std::stack< _Key > &  dst,
_Key &  dstk,
_Key &  srck 
)
inline

Definition at line 151 of file vs_stack.h.

152  {
153  dst.push(srck);
154  }

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