memgraph/include/storage/model/properties/integral.hpp

19 lines
491 B
C++
Raw Normal View History

#pragma once
#include "storage/model/properties/floating.hpp"
#include "storage/model/properties/number.hpp"
#include "storage/model/properties/utils/modulo.hpp"
template <class Derived>
2016-02-21 00:53:09 +08:00
struct Integral : public Number<Derived>, public Modulo<Derived>
{
using Number<Derived>::Number;
2016-02-21 00:53:09 +08:00
template <class T, typename = std::enable_if_t<
std::is_base_of<Floating<T>, T>::value>>
2016-02-21 00:53:09 +08:00
operator T() const
{
return T(this->derived().value);
}
};