diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-07-24 16:12:44 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-07-24 16:12:44 +0200 |
commit | 602d2557ae474636babb75cc89956452a002bd9d (patch) | |
tree | f2e29b2b61db35e1ef0c571c6da7bad5a68fcbb4 /modules/codec/c++ | |
parent | 8a7c83e646656361ab322467ad96eb6a6b09a074 (diff) |
Changing operations to return InterfaceSchema types for mixed precision
Diffstat (limited to 'modules/codec/c++')
-rw-r--r-- | modules/codec/c++/data.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 734a56e..d8208d0 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -205,14 +205,14 @@ public: return {left * right}; } - data<Schema, encode::Native, Storage> operator/(const data<Schema, encode::Native, Storage>& rhs)const{ + data<typename Schema::InterfaceSchema, encode::Native, Storage> operator/(const data<Schema, encode::Native, Storage>& rhs)const{ using CalcType = typename native_data_type<typename Schema::InterfaceSchema>::type; CalcType left = static_cast<CalcType>(value_.get()); CalcType right = static_cast<CalcType>(rhs.get()); return {left / right}; } - data<Schema, encode::Native, Storage> operator+(const data<Schema, encode::Native, Storage>& rhs)const{ + data<typename Schema::InterfaceSchema, encode::Native, Storage> operator+(const data<Schema, encode::Native, Storage>& rhs)const{ using CalcType = typename native_data_type<typename Schema::InterfaceSchema>::type; CalcType left = static_cast<CalcType>(value_.get()); CalcType right = static_cast<CalcType>(rhs.get()); @@ -224,7 +224,7 @@ public: return *this; } - data<Schema, encode::Native, Storage> operator-(const data<Schema, encode::Native, Storage>& rhs)const{ + data<typename Schema::InterfaceSchema, encode::Native, Storage> operator-(const data<Schema, encode::Native, Storage>& rhs)const{ using CalcType = typename native_data_type<typename Schema::InterfaceSchema>::type; CalcType left = static_cast<CalcType>(value_.get()); CalcType right = static_cast<CalcType>(rhs.get()); |