There are many instances in our code base where we could use the C++17 construct if constexpr.
Starting with PR match_system is a constexpr function. Thus many checks against match_system can be made if constexpr. In release mode, this is unlikely to help performance since the compiler optimizer can already know that it is dealing with a compile-time constant. However, it may help with code clarity and maybe have other benefits.
cc @anonrig
There are many instances in our code base where we could use the C++17 construct
if constexpr.Starting with PR
match_systemis a constexpr function. Thus many checks againstmatch_systemcan be madeif constexpr. In release mode, this is unlikely to help performance since the compiler optimizer can already know that it is dealing with a compile-time constant. However, it may help with code clarity and maybe have other benefits.cc @anonrig