Constructs a record of references to the arguments in args suitable for forwarding as an argument to a function. The record has rvalue reference data members when rvalues are used as arguments, and otherwise has lvalue reference data members.
#include <kumi/kumi.hpp>
#include <iostream>
#include <vector>
#include <string>
using namespace kumi::literals;
template<typename Data>
std::vector<std::string> build(Data d)
{
return std::vector<std::string> ( kumi::get<"a"_f>(d)
, std::move(kumi::get<"b"_f>(d))
);
}
int main()
{
auto v = build( kumi::forward_as_record<"a"_f, "b"_f>(4,std::string{"the text !"}));
for(auto const& s : v)
std::cout << s << "\n";
}