Public Types | Static Public Member Functions | List of all members
art::detail::TwoArgInsert< cet::map_vector< T > > Struct Template Reference

#include <CollectionUtilities.h>

Public Types

using mv_t = cet::map_vector< T >
 

Static Public Member Functions

static void concatenate (mv_t &out, mv_t in)
 

Detailed Description

template<typename T>
struct art::detail::TwoArgInsert< cet::map_vector< T > >

Definition at line 246 of file CollectionUtilities.h.

Member Typedef Documentation

template<typename T >
using art::detail::TwoArgInsert< cet::map_vector< T > >::mv_t = cet::map_vector<T>

Definition at line 247 of file CollectionUtilities.h.

Member Function Documentation

template<typename T >
static void art::detail::TwoArgInsert< cet::map_vector< T > >::concatenate ( mv_t out,
mv_t  in 
)
inlinestatic

Definition at line 249 of file CollectionUtilities.h.

250  {
251  // The offset is necessary for concatenating map_vectors so
252  // that all elements will be preserved.
253  auto const d = detail::mix_offset<mv_t>::offset(out);
254  for (auto& pr : in) {
255  pr.first = cet::map_vector_key{pr.first.asInt() + d};
256  }
257  // Because we can guarantee that entries will not overlap due
258  // to using the offset above, we do not need to call
259  // out.insert(...), which will unnecessarily merge entries.
260  // It is the user's responsibility to ensure that the
261  // map_vector entries are properly sorted.
262  out.append(in.begin(), in.end());
263  }
static size_t offset(C const &c)
constexpr unsigned long asInt() const noexcept
Definition: map_vector.h:44

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