The following LIFT macro can be used

#define FWD(...) std::forward<decltype(__VA_ARGS__)>(__VA_ARGS__)
 
#define LIFT(X) [](auto &&... args) \
    noexcept(noexcept(X(FWD(args)...)))  \
    -> decltype(X(FWD(args)...)) \
{  \
    return X(FWD(args)...); \
}

like this:

std::transform(first, last, target, LIFT(foo));

Reference

Passing overload sets to functions