stl_util.h File Reference
|
CPP API
|
stl_util.h File Reference
#include <array>#include <concepts>#include <filesystem>#include <numeric>#include <vector>#include <algorithm>#include <utility>#include <iterator>#include <iostream>#include <iomanip>#include <cstring>#include <cassert>#include <memory>
Include dependency graph for stl_util.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
| class | mio::Range< Iterator, Sentinel > |
| A range of items defined by two iterators. More... | |
Namespaces | |
| mio | |
| A collection of classes to simplify handling of matrix shapes in meta programming. | |
Typedefs | |
| template<class T > | |
| using | mio::VectorRange = std::conditional_t< std::is_const_v< T >, typename mio::Range< typename std::vector< std::remove_const_t< T > >::const_iterator >, typename mio::Range< typename std::vector< std::remove_const_t< T > >::iterator > > |
| Defines generic Range type for IterPair of a vector. More... | |
Functions | |
| template<class Iter , class Pred > | |
| bool | mio::contains (Iter b, Iter e, Pred p) |
| checks if there is an element in this range that matches a predicate More... | |
| template<class U , class T > | |
| std::unique_ptr< U > | mio::dynamic_unique_ptr_cast (std::unique_ptr< T > &&base_ptr) |
| converts a unique_ptr<T> to unique_ptr. More... | |
| template<class T > | |
| constexpr std::array< T, size_t(T::Count)> | mio::enum_members () |
| Get an std::array that contains all members of an enum class. More... | |
| template<typename T > | |
| void | mio::insert_sorted_replace (std::vector< T > &vec, T const &item) |
| template<typename T , typename Pred > | |
| void | mio::insert_sorted_replace (std::vector< T > &vec, T const &item, Pred pred) |
| inserts element in a sorted vector, replacing items that are equal precondition: elements in the vector are partially sorted and unique according the predicate postcondition: same as precondition, additionally contains exactly one element that is equal to item, order of other items is preserved More... | |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, const std::vector< T > &vec) |
| Stream operator for writing std::vector to an std::ostream. Requires that T has a viable overload itself. More... | |
| template<class String , class... Strings> | |
| std::string | mio::path_join (String &&base, Strings &&... app) |
| join one ore more strings with path separators. More... | |
| template<class I , class S > | |
| mio::Range (std::pair< I, S > iterator_pair) -> Range< I, S > | |
| Deduction guide to correctly deduce range type when constructed from a pair. More... | |
| template<class T > | |
| mio::Range (T &&range) -> Range< decltype(range.begin()), decltype(range.end())> | |
| Deduction guide to correctly deduce range type when constructed from another range. More... | |
| std::ostream & | mio::set_ostream_format (std::ostream &out, size_t width, size_t precision, char fill=' ') |
| Adds manipulators for width, (fixed) precision and fill character to an ostream. More... | |
Variables | |
| template<class T > | |
| concept | mio::HasOstreamOperator = requires(std::ostream os, T t) { os << t; } |
| Concept to check if type T has an existing stream output operator "<<". More... | |
Function Documentation
◆ operator<<()
template<class T >
| std::ostream& operator<< | ( | std::ostream & | out, |
| const std::vector< T > & | vec | ||
| ) |
Stream operator for writing std::vector to an std::ostream. Requires that T has a viable overload itself.
Generated by