Porytiles
Loading...
Searching...
No Matches
transform.hpp File Reference
#include <ranges>
#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  porytiles2
 

Functions

template<typename T , typename F >
auto porytiles2::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 porytiles2::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.