Porytiles
Loading...
Searching...
No Matches
transform.hpp File Reference
#include <ranges>
#include <set>
#include <type_traits>
#include <vector>
Include dependency graph for transform.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  porytiles
 

Functions

template<typename T , typename F >
auto porytiles::transform (const std::vector< T > &input, F &&func) -> std::vector< std::invoke_result_t< F, const T & > >
 Transforms a vector of type T into a vector of type U using a mapping function.
 
template<typename U , typename T >
requires std::constructible_from<U, T>
auto porytiles::transform (const std::vector< T > &input) -> std::vector< U >
 Transforms a vector of type T into a vector of type U using direct type construction.
 
template<typename T , typename F >
auto porytiles::transform (const std::set< T > &input, F &&func) -> std::set< std::invoke_result_t< F, const T & > >
 Transforms a set of type T into a set of type U using a mapping function.
 
template<typename U , typename T >
requires std::constructible_from<U, T>
auto porytiles::transform (const std::set< T > &input) -> std::set< U >
 Transforms a set of type T into a set of type U using direct type construction.