On Sat, 2025-08-09 at 23:34 +0300, Ville Voutilainen wrote:
On Sat, 9 Aug 2025 at 23:23, Avi Kivity <avi@scylladb.com> wrote:

However.. ..should we have a function object version of
make_from_tuple somewhere in this bigger picture?


With p3312:

    std::bind_front(&std::apply, &T::T)

I don't think that paper or its general approach is a solution we can
expect to have. The problem with it and various predecessors
is that it doesn't capture overload sets that have ADL-only overloads
in them. There are some thoughts how to approach
solving that part of the problem, but they are not baked.


I'm sorry to hear that. I really like that proposal.

If there is interest, I can add std::constructor_from_tuple().

But maybe a function-object applier is better.


std::bind_front(std::applier(), std::constructor<T>());

std::applier()/std::function_application()/whatever is a function object whose operator()() forwards to std::apply().