From 4f1419002f8889d443bd5e9cdbaf83c9b77f1ece Mon Sep 17 00:00:00 2001
From: cmoineau <cyril.moineau@cea.fr>
Date: Tue, 3 Oct 2023 14:38:57 +0000
Subject: [PATCH] [Paramerter] Add exit(-1) to end get recursion.

---
 include/aidge/utils/Parameter.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/aidge/utils/Parameter.hpp b/include/aidge/utils/Parameter.hpp
index 6f8c7e01f..b3d137f9d 100644
--- a/include/aidge/utils/Parameter.hpp
+++ b/include/aidge/utils/Parameter.hpp
@@ -157,6 +157,7 @@ public:
     template <typename R, std::size_t SIZE = std::tuple_size<std::tuple<T...>>::value>
     [[noreturn]] constexpr typename std::enable_if<(SIZE == 0), R&>::type get(std::size_t /*i*/) {
         assert(false && "parameter not found");
+        exit(-1);
     }
 
     constexpr const std::tuple<T...>& getParams() const {
-- 
GitLab