[cleanup] Use if constexpr to replace SFINAE

Merged Timo Koch requested to merge feature/use-if-constexpr into master

Merge request reports