Converts a kumi::tuple to an instance of an arbitrary type.
More...
Converts a kumi::tuple to an instance of an arbitrary type.
◆ from_tuple
template<typename Type>
| from_tuple_t<Type> kumi::from_tuple {} |
|
inlineconstexprnodiscard |
Constructs an instance of Type by passing elements of t to the appropriate constructor.
{
template<typename Type, concepts::product_type T>
}
constexpr from_tuple_t< Type > from_tuple
Definition tuple.hpp:787
Main KUMI namespace.
Definition algorithm.hpp:11
- An instance of Type constructed from each element of t in order.
#include <kumi/kumi.hpp>
#include <iostream>
#include <string>
struct my_struct
{
int i;
float f;
};
int main()
{
std::cout << a << "\n";
std::cout << b.i << ' ' << b.f << ' ' << b.name << "\n";
}
constexpr make_tuple_t make_tuple
Definition tuple.hpp:655
Compile-time text based identifier.
Definition identifier.hpp:165