diff options
Diffstat (limited to 'modules/codec/c++/data.hpp')
| -rw-r--r-- | modules/codec/c++/data.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index ae9d8eb..79a6ab8 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -171,6 +171,10 @@ public: constexpr data<Schema, encode::Native> operator-(const data<Schema, encode::Native>& rhs)const{ return {get() - rhs.get()}; } + + constexpr data<Schema, encode::Native> operator-() const { + return {-get()}; + } constexpr data<Schema, encode::Native>& operator++() { set(get() + static_cast<typename native_data_type<Schema>::type>(1)); |
