New callswitch implementation violates ODR
The new callswitch implementation uses lambdas to define functionals. These currently violate the one definition rule.
I see three options:
- move all these functionals into an anonymous namespace
- manually define the functionals (as
struct
) and mark theoperator()
asinline
- introduce a helper function which wraps a lambda to create something that does not violate the ODR (not sure this works...)