The Gaudi Framework  master (37c0b60a)
Containers::traits< CONTAINER, DATATYPE > Struct Template Reference

Container traits class. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/KeyedTraits.h>

Static Public Member Functions

static bool checkBounds (const std::vector< DATATYPE * > *cnt, const typename DATATYPE::key_type &k)
 Allow to check the access to container elements for consistency. More...
 

Detailed Description

template<class CONTAINER, class DATATYPE>
struct Containers::traits< CONTAINER, DATATYPE >

Container traits class.

Definition of the container traits class.

Select if container-checks should be performed by switching on/off the macro CHECK_KEYED_CONTAINER.

Author
M.Frank CERN/LHCb
Version
1.0

Definition at line 44 of file KeyedTraits.h.

Member Function Documentation

◆ checkBounds()

template<class CONTAINER , class DATATYPE >
static bool Containers::traits< CONTAINER, DATATYPE >::checkBounds ( const std::vector< DATATYPE * > *  cnt,
const typename DATATYPE::key_type &  k 
)
inlinestatic

Allow to check the access to container elements for consistency.

Definition at line 127 of file KeyedTraits.h.

127  {
128 #ifdef CHECK_KEYED_CONTAINER
129  return size_t( cnt->size() ) > size_t( traits::hash( k ) );
130 #else
131  return true;
132 #endif
133  }

The documentation for this struct was generated from the following file:
std::vector::size
T size(T... args)