diff --git a/include/aidge/operator/Producer.hpp b/include/aidge/operator/Producer.hpp index 593192c9f402e2646ac94cff68aa0c805f5aecd1..07d932bd0501832c78df2c3530f657b57251183f 100644 --- a/include/aidge/operator/Producer.hpp +++ b/include/aidge/operator/Producer.hpp @@ -121,11 +121,11 @@ public: inline const std::vector<DimSize_t> dims() const noexcept { return mOutput->dims(); } - void setBackend(const std::string& name) { + void setBackend(const std::string& name) override { mImpl = Registrar<Producer_Op>::create(name)(*this); mOutput->setBackend(name); } - void setDatatype(const DataType& datatype) { + void setDatatype(const DataType& datatype) override { mOutput->setDatatype(datatype); } diff --git a/include/aidge/utils/StaticAttributes.hpp b/include/aidge/utils/StaticAttributes.hpp index fb800cffbcff5d4113961f8e62977417336f2cb8..88724723a10c5c5c1c38dfd069a723a49d92f723 100644 --- a/include/aidge/utils/StaticAttributes.hpp +++ b/include/aidge/utils/StaticAttributes.hpp @@ -87,7 +87,7 @@ public: // Runtime access with name template <typename R> - constexpr R& getAttr(const char* name) { + R& getAttr(const char* name) { for (std::size_t i = 0; i < size(EnumStrings<ATTRS_ENUM>::data); ++i) { if (strcmp(EnumStrings<ATTRS_ENUM>::data[i], name) == 0) { return getAttr<R>(i); @@ -98,7 +98,7 @@ public: } template <typename R, std::size_t SIZE = std::tuple_size<std::tuple<T...>>::value> - constexpr typename std::enable_if<(SIZE > 0), R&>::type getAttr(std::size_t i) { + typename std::enable_if<(SIZE > 0), R&>::type getAttr(std::size_t i) { if (i == SIZE-1) { if (std::is_same<R, typename std::tuple_element<SIZE-1,std::tuple<T...>>::type>::value) { return reinterpret_cast<R&>(std::get<SIZE-1>(mAttrs)); @@ -113,7 +113,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 getAttr(std::size_t /*i*/) { + [[noreturn]] typename std::enable_if<(SIZE == 0), R&>::type getAttr(std::size_t /*i*/) { AIDGE_THROW_OR_ABORT(std::runtime_error, "attribute not found"); } @@ -128,7 +128,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 { + [[noreturn]] typename std::enable_if<(SIZE == 0), const std::type_info&>::type getAttrType(std::size_t /*i*/) const { AIDGE_THROW_OR_ABORT(std::runtime_error, "attribute not found"); } @@ -140,7 +140,7 @@ public: /// Generic Attributes API ////////////////////////////////////// // Runtime existance check with name - constexpr bool hasAttr(const std::string& name) const override final { + bool hasAttr(const std::string& name) const override final { for (std::size_t i = 0; i < size(EnumStrings<ATTRS_ENUM>::data); ++i) { if (name == EnumStrings<ATTRS_ENUM>::data[i]) { return true; @@ -151,7 +151,7 @@ public: } // Runtime type access with name - constexpr std::string getAttrType(const std::string& name) const override final { + std::string getAttrType(const std::string& name) const override final { for (std::size_t i = 0; i < size(EnumStrings<ATTRS_ENUM>::data); ++i) { if (name == EnumStrings<ATTRS_ENUM>::data[i]) { return getAttrType(i).name();