LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/

Simple traits for container classes.Trait classes describing a type have a type member defined after that type. They are also available as template types, in the fashion of C++14. More...

Classes

struct  util::collection_value_type< Coll >
 Trait of value contained in the template collection Coll. More...
 
struct  util::collection_value_access_type< Coll >
 Trait of type obtained by access to element of collection Coll. More...
 
struct  util::collection_value_constant_access_type< Coll >
 Trait of type obtained by constant access to element of collection Coll. More...
 

Typedefs

template<typename Coll >
using util::collection_value_t = typename collection_value_type< Coll >::type
 Type contained in the collection Coll. More...
 
template<typename Coll >
using util::collection_value_access_t = typename collection_value_access_type< Coll >::type
 Type obtained by constant access to element of collection Coll. More...
 
template<typename Coll >
using util::collection_value_constant_access_t = typename collection_value_constant_access_type< Coll >::type
 Type obtained by constant access to element of collection Coll. More...
 

Detailed Description

Simple traits for container classes.

Trait classes describing a type have a type member defined after that type. They are also available as template types, in the fashion of C++14.

Trait classes describing a value have a value member (static, constexpr) defined with that value. They are also available as template constants, in the fashion of C++17.

Container value traits

Container classes mimicking the C++ STL interface provide a value_type type detailing the contained object. This is generalised in the util::collection_value_type trait, which can be specialised for containers which do not support that.

Two additional traits are provided, which describe the type obtained by accessing an element of the container. This is a close relative of util::collection_value_type, but it may be decorated by l-value reference or constantness depending on the container. The two traits represent access one to a container that is mutable, the other to one that is constant.

Typedef Documentation

template<typename Coll >
using util::collection_value_access_t = typedef typename collection_value_access_type<Coll>::type

Type obtained by constant access to element of collection Coll.

Definition at line 84 of file ContainerMeta.h.

template<typename Coll >
using util::collection_value_constant_access_t = typedef typename collection_value_constant_access_type<Coll>::type

Type obtained by constant access to element of collection Coll.

Definition at line 104 of file ContainerMeta.h.

template<typename Coll >
using util::collection_value_t = typedef typename collection_value_type<Coll>::type

Type contained in the collection Coll.

Definition at line 65 of file ContainerMeta.h.