From fbac90ec1730c36debb669d4c9113b4d39b5f931 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Mon, 2 Oct 2023 14:19:22 +0200 Subject: [PATCH] Fixed MSVC error --- include/aidge/utils/StaticAttributes.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/aidge/utils/StaticAttributes.hpp b/include/aidge/utils/StaticAttributes.hpp index 98011b748..edeed49cb 100644 --- a/include/aidge/utils/StaticAttributes.hpp +++ b/include/aidge/utils/StaticAttributes.hpp @@ -15,6 +15,7 @@ #include <tuple> #include <cassert> #include <cstddef> +#include <typeinfo> #include "aidge/utils/Attributes.hpp" @@ -128,6 +129,7 @@ public: template <std::size_t SIZE = std::tuple_size<std::tuple<T...>>::value> [[noreturn]] constexpr typename std::enable_if<(SIZE == 0), const std::type_info&>::type getAttrType(std::size_t /*i*/) const { assert(false && "attribute not found"); + return typeid(void); // avoid MSVC error C4716: "must return a value", despite [[noreturn]] attribute } constexpr const std::tuple<T...>& getStaticAttributes() const { -- GitLab