diff --git a/corsika/detail/framework/process/SwitchProcessSequence.inl b/corsika/detail/framework/process/SwitchProcessSequence.inl
index 307da2e006d722b889ba6c97b13694a4a03c3efa..05b72c0c56c37e789f37ff829a3af5c23f089032 100644
--- a/corsika/detail/framework/process/SwitchProcessSequence.inl
+++ b/corsika/detail/framework/process/SwitchProcessSequence.inl
@@ -233,7 +233,7 @@ namespace corsika {
           return A_.getCrossSection(projectile, projectile.getPID(),
                                     {projectile.getEnergy(), projectile.getMomentum()});
         }
-      } else if (process1_type::is_process_sequence) {
+      } else if constexpr (process1_type::is_process_sequence) {
         return A_.getCrossSection(projectile, targetId, targetP4);
       }
 
@@ -252,7 +252,7 @@ namespace corsika {
         } else {
           return B_.getCrossSection(projectile, targetId, targetP4);
         }
-      } else if (process2_type::is_process_sequence) {
+      } else if constexpr (process2_type::is_process_sequence) {
         return B_.getCrossSection(projectile, targetId, targetP4);
       }
     }