|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Conversion utilities between Aleph-w containers and STL containers. More...
#include <list>#include <vector>#include <tuple>#include <utility>#include <htlist.H>#include <tpl_dynDlist.H>#include <tpl_array.H>#include <tpl_dynArray.H>#include <tpl_dynSetTree.H>Go to the source code of this file.
Classes | |
| struct | Aleph::index_tuple< Indexes > |
| A type that represents a parameter pack of zero or more integers. More... | |
| struct | Aleph::make_index_tuple< Size > |
| Unary metafunction that generates an index_tuple containing [0, Size). More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Typedefs | |
| template<typename... Types> | |
| using | Aleph::to_index_tuple = typename make_index_tuple< sizeof...(Types)>::type |
| Convenience alias to generate an index tuple from a parameter pack. | |
Functions | |
| template<class F , class... Ts, std::size_t... Is> | |
| void | Aleph::tuple_for_each (const std::tuple< Ts... > &tuple, F func, std::index_sequence< Is... >) |
| Apply a function to each element in a tuple (tuple first). | |
| template<class F , class... Ts> | |
| void | Aleph::tuple_for_each (const std::tuple< Ts... > &tuple, F func) |
| template<class T > | |
| DynList< T > | Aleph::vector_to_DynList (const std::vector< T > &v) |
| Convert a std::vector to a DynList. | |
| template<typename T > | |
| DynList< T > | Aleph::to_DynList (const std::vector< T > &v) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Alias for vector_to_DynList. | |
| template<typename Iterator > | |
| auto | Aleph::range_to_DynList (Iterator begin, Iterator end) -> DynList< std::decay_t< decltype(*begin)> > |
| Convert an iterator range to a DynList. | |
| template<typename T > | |
| Array< T > | Aleph::to_Array (const std::vector< T > &v) |
| Convert a std::vector to an Array. | |
| template<typename Container > | |
| std::vector< typename Container::Item_Type > | Aleph::to_vector (const Container &container) |
| Convert an Aleph-w container to a std::vector. | |
| template<typename T , class Op > | |
| auto | Aleph::map_vector (const std::vector< T > &v, Op op) -> std::vector< std::decay_t< decltype(op(v[0]))> > |
| Map a function over a std::vector. | |
| template<typename T , typename... Args> | |
| std::vector< T > | Aleph::variadic_to_vector (Args &&... args) |
| Convert a variadic parameter pack to a std::vector. | |
| template<typename T , typename... Args> | |
| DynList< T > | Aleph::variadic_to_DynList (Args &&... args) |
| Convert a variadic parameter pack to a DynList. | |
| template<class Container , typename T , typename... U> | |
| Container | Aleph::tuple_to_container (const std::tuple< T, U... > &t) |
| Convert a tuple to an Aleph-w container. | |
| template<typename T , typename... U> | |
| DynList< T > | Aleph::tuple_to_dynlist (const std::tuple< T, U... > &t) |
| Convert a tuple to a DynList. | |
| template<typename T , typename... U> | |
| Array< T > | Aleph::tuple_to_array (const std::tuple< T, U... > &t) |
| Convert a tuple to an Array. | |
| template<typename StlContainer > | |
| auto | Aleph::stl_container_to_dynList (const StlContainer &container) -> DynList< typename StlContainer::value_type > |
| Convert any STL container to a DynList. | |
| template<typename T > | |
| DynList< T > | Aleph::list_to_DynList (const std::list< T > &l) |
| Convert a std::list to a DynList. | |
| template<typename T > | |
| std::list< T > | Aleph::DynList_to_list (const DynList< T > &l) |
| Convert a DynList to a std::list. | |
| template<typename T > | |
| std::vector< T > | Aleph::DynArray_to_vector (const DynArray< T > &arr) |
| Convert a DynArray to a std::vector. | |
| template<class T > | |
| DynArray< T > | Aleph::vector_to_DynArray (const std::vector< T > &v) |
| Convert a std::vector to a DynArray. | |
Conversion utilities between Aleph-w containers and STL containers.
This file provides functions for converting between Aleph-w containers (DynList, Array, DynArray) and STL containers (std::vector, std::list), as well as utilities for working with tuples.
All functions are defined in namespace Aleph and exported to global scope for backward compatibility via using declarations.
Definition in file ah-stl-utils.H.