memgraph/include/storage/model/properties/utils/unary_negation.hpp

13 lines
205 B
C++
Raw Normal View History

#pragma once
#include "utils/crtp.hpp"
template <class Derived>
2016-02-21 00:53:09 +08:00
struct UnaryNegation : public Crtp<Derived>
{
Derived operator-() const
{
return Derived(-this->derived().value);
}
};