Skip to content
Snippets Groups Projects
Commit fbac90ec authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed MSVC error

parent a4acfca1
No related branches found
No related tags found
1 merge request!16Unified interface for attributes
Pipeline #32299 failed
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <tuple> #include <tuple>
#include <cassert> #include <cassert>
#include <cstddef> #include <cstddef>
#include <typeinfo>
#include "aidge/utils/Attributes.hpp" #include "aidge/utils/Attributes.hpp"
...@@ -128,6 +129,7 @@ public: ...@@ -128,6 +129,7 @@ public:
template <std::size_t SIZE = std::tuple_size<std::tuple<T...>>::value> 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 { [[noreturn]] constexpr typename std::enable_if<(SIZE == 0), const std::type_info&>::type getAttrType(std::size_t /*i*/) const {
assert(false && "attribute not found"); 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 { constexpr const std::tuple<T...>& getStaticAttributes() const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment