template<typename _Key, typename _Comp = std::less<_Key>, typename _Strategy = vs_tree_strategy<_Key, _Comp>>
class vs::vs_tree< _Key, _Comp, _Strategy >
A versioned AVL-tree with deep copy constructor in internal classes.
- Parameters
-
| _Key | Type of key objects. |
| _Comp | Comparison function object type, defaults to less<_Key>. |
| _Strategy | Custom strategy class for different merge behaviour |
Definition at line 453 of file vs_tree.h.
template<typename _Key , typename _Comp = std::less<_Key>, typename _Strategy = vs_tree_strategy<_Key, _Comp>>
| vs::vs_tree< _Key, _Comp, _Strategy >::vs_tree |
( |
std::initializer_list< _Key > |
__l, |
|
|
const _Comp & |
__comp = _Comp() |
|
) |
| |
|
inline |
Builds a vs_tree from an initializer_list.
- Parameters
-
| __l | An initializer_list. |
| __comp | Comparator to use. |
Copy elements of the list to created vs_tree. Lots of copies in process, but only one version gets added.
Definition at line 489 of file vs_tree.h.
491 : _v_t(_vs_tree<_Key, _Comp>())
494 [&](_vs_tree<_Key, _Comp>& _tree){
const T & Get() const
Get the current value of the object in the current Revision.
bool Set(const T &v, const std::function< bool(T &)> &updater=nullptr)
Set new value of the object.