4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::container Namespace Reference

Various containers and utility functions. More...

Namespaces

namespace  bitfield
 Contains fcppt::container::bitfield::object and helper types/functions for it.
 
namespace  buffer
 
namespace  grid
 Contains fcppt::container::grid::object and helper types/functions for it.
 
namespace  raw_vector
 
namespace  tree
 

Classes

class  dynamic_array
 An array of dynamic size that does not initialize. More...
 
class  get_or_insert_result
 The result type of fcppt::container::get_or_insert_with_result. More...
 
class  index_map
 An index-based container that grows on demand. More...
 
class  move_range
 A range that moves its elements. More...
 

Typedefs

template<typename Range >
using size_result_type
 The size type of a range.
 
template<typename Container >
using to_iterator_type
 Gets the iterator type of a container.
 
template<typename Container >
using to_mapped_type
 Gets the mapped type of an associative container.
 
template<typename Container >
using to_pointer_type
 Gets the pointer type of a container.
 
template<typename Container >
using to_reference_type
 Gets the reference type of a container.
 
template<typename Container >
using to_value_type
 The value type of a container depending on its constness.
 
template<typename Container >
using uncons_result
 

Functions

template<typename Container >
fcppt::optional::reference< fcppt::container::to_value_type< Container > > at_optional (Container &_container, typename Container::size_type const _index)
 Returns an element as an optional at a given position.
 
template<typename Container >
fcppt::container::to_pointer_type< Container > data (Container &_container)
 Returns a pointer to the beginning of a random access container.
 
template<typename Container >
fcppt::container::to_pointer_type< Container > data_end (Container &_container)
 Returns a pointer one past the end of a random-access container>
 
template<typename Container , typename Key >
fcppt::optional::reference< fcppt::container::to_value_type< Container > > find_opt (Container &_container, Key const &_key)
 Returns an element from a find operation or an empty optional.
 
template<typename Container , typename Key >
fcppt::optional::object< fcppt::container::to_iterator_type< Container > > find_opt_iterator (Container &_container, Key const &_key)
 Returns an iterator from a find operation or an empty optional.
 
template<typename Container , typename Key >
fcppt::optional::object< fcppt::reference< fcppt::container::to_mapped_type< Container > > > find_opt_mapped (Container &_container, Key const &_key)
 Returns an element from a find operation or an empty optional.
 
template<typename Container , typename Create >
Container::mapped_type & get_or_insert (Container &_container, typename Container::key_type const &_key, Create const &_create)
 Gets from or inserts an element into a map.
 
template<typename Container , typename Create >
fcppt::container::get_or_insert_result< typename Container::mapped_type & > get_or_insert_with_result (Container &_container, typename Container::key_type const &_key, Create const &_create)
 Gets from or inserts an element into a map and returns if it was inserted.
 
template<typename Container , typename Value >
bool insert (Container &_container, Value &&_value)
 Inserts into an associative container.
 
template<typename Container , typename... Args>
std::remove_cvref_t< Container > join (Container &&_first, Args &&..._args)
 Joins two containers.
 
template<typename Set , typename Map >
Set key_set (Map const &_map)
 Creates a set of keys from a map.
 
template<typename Container , typename... Args>
Container make (Args &&..._args)
 Creates a container from variadic arguments by moving.
 
template<typename Container >
fcppt::container::move_range< std::remove_reference_t< Container > > make_move_range (Container &&_container)
 Creates a move range from a container.
 
template<typename Result , typename Map >
Result map_values_copy (Map const &_map)
 Copies the mapped values of an associative container into a container.
 
template<typename Result , typename Map >
Result map_values_ref (Map &_map)
 Maps the mapped values of an associative container to a container of references.
 
template<typename Container >
fcppt::optional::reference< fcppt::container::to_value_type< Container > > maybe_back (Container &_container)
 Returns the back of a container as an optional.
 
template<typename Container >
fcppt::optional::reference< fcppt::container::to_value_type< Container > > maybe_front (Container &_container)
 Returns the front of a container as an optional.
 
template<typename Container >
fcppt::container::detail::output< Container > output (Container const &_container) noexcept
 Creates a class that has an output operator to print a container.
 
template<typename Container >
fcppt::optional::object< fcppt::container::to_value_type< Container > > pop_back (Container &_container)
 Pops the back of a container as an optional.
 
template<typename Container >
fcppt::optional::object< fcppt::container::to_value_type< Container > > pop_front (Container &_container)
 Pops the front of a container as an optional.
 
template<typename Set >
Set set_difference (Set const &_a, Set const &_b)
 Returns the difference of two sets.
 
template<typename Set >
Set set_intersection (Set const &_a, Set const &_b)
 Returns the intersection of two sets.
 
template<typename Set >
Set set_union (Set const &_a, Set const &_b)
 Returns the union of two sets.
 
template<typename Range >
fcppt::container::size_result_type< Range > size (Range const &_range)
 The size of a range.
 
template<typename Container >
fcppt::container::uncons_result< Container > uncons (Container &_container)
 Splits a container into its head and tail.
 

Detailed Description

Various containers and utility functions.

Typedef Documentation

◆ uncons_result