4 ms·
How about `std::make_from_tuple` for constructors or `std::apply` for functions (C++17)? It might be a bit verbose, but I think I would still prefer this over
by spanishgum 6y ago
How about `std::make_from_tuple` for constructors or `std::apply` for functions (C++17)?
It might be a bit verbose, but I think I would still prefer this over native syntax for unpacking.
- adrift 6y agoWhy would you kill your compile times like that.
- marvy 6y agoThis mostly solves the unpacking problem. Thus, there are only two problems left: 1. I need to handcraft the tuple type myself, and make sure it matches the function declaration. (In other words, I don't want to manually write tuple<char, short>. I want to write foo::arg_tuple.) 2. This provides no support for named parameters. Tuples in C++ are numbered, not named.