|
FlatImage
A configurable Linux containerization system
|
Vector and container manipulation utilities. More...
Functions | |
| template<ns_concept::Iterable R1, ns_concept::Iterable R2> | |
| void | append_range (R1 &to, R2 const &from) noexcept |
| Appends a range of values from a src to a dst. | |
| template<ns_concept::Iterable R, typename... Args> requires ( std::convertible_to<Args, typename R::value_type> && ... ) | |
| void | push_back (R &r, Args &&... args) noexcept |
| Helper to push back multiple elements into an input iterator. | |
| template<ns_concept::Iterable R, typename... Args> requires ( std::convertible_to<Args, typename R::value_type> && ... ) | |
| void | push_front (R &r, Args &&... args) noexcept |
| Helper to prepend multiple elements to the front of a container. | |
| template<ns_concept::Iterable R = std::vector<std::string>> | |
| R | from_string (ns_concept::StringRepresentable auto &&t, char delimiter) noexcept |
| Creates a range from a string. | |
Vector and container manipulation utilities.
This namespace provides utility functions for working with std::vector and other standard library containers. It includes operations for appending ranges, pushing multiple elements at once, prepending elements to the front of a container, and creating containers from delimited strings.
|
inlinenoexcept |
Appends a range of values from a src to a dst.
This is available in C++23, not implemented yet on gcc however
| R1 | An iterable type |
| R2 | An iterable type |
| to | The target to push elements into |
| from | The source to read elements from |
Definition at line 39 of file vector.hpp.
|
inlinenoexcept |
Creates a range from a string.
| R | A container type, defaults to std::vector<std::string> |
| t | The string representable value to convert into a container |
| delimiter | The delimiter to split elements in the string |
Definition at line 84 of file vector.hpp.
|
inlinenoexcept |
Helper to push back multiple elements into an input iterator.
| R | An iterable type |
| Args | Type of the arguments to push back |
| r | The range to push elements into |
| args | The arguments to push into the range |
Definition at line 54 of file vector.hpp.
|
inlinenoexcept |
Helper to prepend multiple elements to the front of a container.
| R | An iterable type |
| Args | Type of the arguments to prepend |
| r | The container to prepend elements into |
| args | The arguments to prepend to the container |
Definition at line 69 of file vector.hpp.