Solutionunvalidated

Instead, you could define a functor `foo` like this — If the goal is mainly to process some type checkings on your parameters. Tension: without macros. Outcome: Then, you can define a structure (say `CommonFloatChecker`) that encapsulates a generic functor `Fct` and makes the required checkings at compile time.

8772f643-d9a4-4871-9501-720fe72812d1

Instead, you could define a functor foo like this — If the goal is mainly to process some type checkings on your parameters. Tension: without macros. Outcome: Then, you can define a structure (say CommonFloatChecker) that encapsulates a generic functor Fct and makes the required checkings at compile time.