Converts a product_type<Ts...> to an instance of a product_type<Target...>
- Template Parameters
-
| Target | destination type to assocaite to each member of the product type |
- Parameters
-
- Returns
- A Product type containing the values of b where each member is of type Target
Helper type
namespace kumi::result
{
template<
typename Target, product_type T>
struct member_cast;
template<typename Target, Product_type T>
using member_cast_t = typename member_cast<Target, T>::type;
}
constexpr auto member_cast(T &&t)
Converts a product_type<Ts...> to an instance of a product_type<Target...>
Definition cast.hpp:84
Computes the return type of a call to kumi::member_cast
Example
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
auto b = kumi::member_cast<char>(a);
std::cout << a << "\n";
std::cout << b << "\n";
}
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:37