Skip to content

[cleanup] Simplify Hybrid::switchCases

Carsten Gräser requested to merge feature/simplify-hybrid-switchcases into master

Since the main purpose of Hybrid::switchCases is to do a dynamic-to-static dispatch, it's reasonable to keep this case simple. This is achieved, by using a fully dynamic implementation (instead of Hybrid::... utilities). This also simplifies error messages.

To keep the (unusual) case of passing an already static index working without extra runtime cost, this is now implemented separately. Again this implementation is far simpler than before.

Furthermore this adds some checks for Hybrid::switchCases which fixes #44 (closed).

Merge request reports

Loading