The C++17 std::apply() function takes a function and a tuple and calls the function with the contents of the the tuple as its arguments.
std::apply invokes a callable object with arguments from a collection, whose type supports std::get and std::tuple_size methods. Examples of such collections are std::tuple, std::array and std::pair.
Some pre-C++17 compilers support experimental version of std::apply.