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

Fixed Clang compiler errors

parent 29640647
No related branches found
No related tags found
1 merge request!26More builds
Pipeline #32747 failed
......@@ -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);
}
......
......@@ -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();
......
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