Flow 1.0.0
Flow project: Full implementation reference.
Static Public Attributes | Private Member Functions | List of all members
flow::util::Container_traits< Container > Class Template Reference

Properties of various container types. More...

#include <traits.hpp>

Collaboration diagram for flow::util::Container_traits< Container >:
[legend]

Static Public Attributes

static constexpr bool S_CHANGE_INVALIDATES_ITERATORS = false
 If false, a change (erasure, addition of an element) in the Container will invalidate NO iterator to that Container, previously obtained, except for potentially any iterator to the element being erased (if applicable). More...
 
static constexpr bool S_SORTED = false
 true if and only if iterating over the elements of a Container yields them in sorted order. More...
 
static constexpr bool S_CONSTANT_TIME_SEARCH = false
 true if and only if finding an element of Container by key takes at most constant amortized time. More...
 
static constexpr bool S_CONSTANT_TIME_INSERT = false
 true if and only if adding an element to a Container (anywhere) takes at most constant amortized time. More...
 

Private Member Functions

 Container_traits ()=delete
 Forbid all instantion.
 

Detailed Description

template<typename Container>
class flow::util::Container_traits< Container >

Properties of various container types.

For example, "Container_traits<std::vector>::S_CHANGE_INVALIDATES_ITERATORS == true", while "Container_traits<std::list>::S_CHANGE_INVALIDATES_ITERATORS == false". The template defines the interface, then the specializations for various container types define the implementations.

Template Parameters
ContainerThe container type being described.

Definition at line 42 of file traits.hpp.

Member Data Documentation

◆ S_CHANGE_INVALIDATES_ITERATORS

template<typename Container >
constexpr bool flow::util::Container_traits< Container >::S_CHANGE_INVALIDATES_ITERATORS = false
staticconstexpr

If false, a change (erasure, addition of an element) in the Container will invalidate NO iterator to that Container, previously obtained, except for potentially any iterator to the element being erased (if applicable).

Definition at line 52 of file traits.hpp.

◆ S_CONSTANT_TIME_INSERT

template<typename Container >
constexpr bool flow::util::Container_traits< Container >::S_CONSTANT_TIME_INSERT = false
staticconstexpr

true if and only if adding an element to a Container (anywhere) takes at most constant amortized time.

Definition at line 58 of file traits.hpp.

◆ S_CONSTANT_TIME_SEARCH

template<typename Container >
constexpr bool flow::util::Container_traits< Container >::S_CONSTANT_TIME_SEARCH = false
staticconstexpr

true if and only if finding an element of Container by key takes at most constant amortized time.

Definition at line 56 of file traits.hpp.

◆ S_SORTED

template<typename Container >
constexpr bool flow::util::Container_traits< Container >::S_SORTED = false
staticconstexpr

true if and only if iterating over the elements of a Container yields them in sorted order.

Definition at line 54 of file traits.hpp.


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