Skip to content

Rewrite the UGGridIndexSet::subIndex methods with if constexpr

Oliver Sander requested to merge rewrite-uggridindexsets-subindex into master

The subIndex methods of the two UGGridIndexSet implementations contains a lot of compile-time case switching. This was previously implemented using Hybrid::ifElse, which worked, but it wasn't the pinnacle of beauty. This patch reimplements the method using 'if constexpr' instead, which has been allowed post dune-2.7.

Merge request reports