All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
util::collection_reference_type< Coll > Struct Template Reference

Trait of a type that can be used to reference the collection Coll. More...

#include <ContainerMeta.h>

Inheritance diagram for util::collection_reference_type< Coll >:
util::details::make_collection_reference_impl< std::remove_reference_t< Coll > >

Additional Inherited Members

- Public Types inherited from util::details::make_collection_reference_impl< std::remove_reference_t< Coll > >
using type = std::reference_wrapper< std::remove_reference_t< Coll > >
 
- Static Public Member Functions inherited from util::details::make_collection_reference_impl< std::remove_reference_t< Coll > >
static auto make (std::remove_reference_t< Coll > &coll)
 

Detailed Description

template<typename Coll>
struct util::collection_reference_type< Coll >

Trait of a type that can be used to reference the collection Coll.

Template Parameters
Colltype of the collection to be referenced

The goal is to have an object with access to the data of the collection of type Coll: this object should be able to be copied, but should not duplicate (copy) the data. The most versatile solution is to have a reference to Coll, and in particular std::reference_wrapper does the job. But in some special cases Coll itself will do already, as it is for a bare C pointer.

This trait describes a type with these characteristics, privileging the simplest solution.

Definition at line 106 of file ContainerMeta.h.


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