Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
ContainerTraits< M, IF_is_map< M > > Struct Template Reference

#include "lib/diff/tree-mutator-collection-binding.hpp"

Description

template<typename M>
struct lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::ContainerTraits< M, IF_is_map< M > >

Definition at line 141 of file tree-mutator-collection-binding.hpp.

Public Types

using Map = _AsMap< M >
 
using Key = Map::key_type
 
using Val = Map::mapped_type
 
using Elm = std::pair< const Key, Val >
 

Static Public Member Functions

static auto recentElmRawIter (Map &map)
 heuristic for std::map: lookup via reverse iterator.
 
static void append (Map &map, Elm &&elm)
 

Member Typedef Documentation

◆ Map

template<typename M >
using Map = _AsMap<M>

Definition at line 143 of file tree-mutator-collection-binding.hpp.

◆ Key

template<typename M >
using Key = Map::key_type

Definition at line 144 of file tree-mutator-collection-binding.hpp.

◆ Val

template<typename M >
using Val = Map::mapped_type

Definition at line 145 of file tree-mutator-collection-binding.hpp.

◆ Elm

template<typename M >
using Elm = std::pair<const Key, Val>

Definition at line 146 of file tree-mutator-collection-binding.hpp.

Member Function Documentation

◆ recentElmRawIter()

template<typename M >
static auto recentElmRawIter ( Map map)
inlinestatic

heuristic for std::map: lookup via reverse iterator.

Since std::map iterates in key order, the most recently inserted element is likely also the largest element. If this guess fails, there will always be a second try by searching over all elements.

Definition at line 154 of file tree-mutator-collection-binding.hpp.

◆ append()

template<typename M >
static void append ( Map map,
Elm &&  elm 
)
inlinestatic

Definition at line 161 of file tree-mutator-collection-binding.hpp.

+ Collaboration diagram for ContainerTraits< M, IF_is_map< M > >:

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