Multi tuple apply
Follow-up of !4906 (merged).
This MR adds functions ProcessLib::Graph::apply()
and ProcessLib::Graph::eval()
that are similar to std::apply(some_function, some_tuple)
:
std::apply()
invokes a function with arguments taken from the passed tuple.
The functions from this MR invoke a passed function f
with arguments taken from an arbitrary number of passed tuples.
The arguments passed to f
are selected based on their type.
Therefore, the argument types in f
s signature and the member types of all passed tuples must be unique.
ProcessLib::Graph::apply()
works with function objects, ProcessLib::Graph::eval()
works with classes having an eval()
method (cf. constitutive models in TRM, TH2M, LD, SD processes.
This functionality will be used for further process restructurings.
-
Feature description was added to the changelog -
Tests covering your feature were added? -
Any new feature or behaviour change was documented?