Skip to content

Multi tuple apply

Christoph Lehmann requested to merge chleh/ogs:multi-tuple-apply into master

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 fs 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.

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behaviour change was documented?
Edited by Christoph Lehmann

Merge request reports