Go to the source code of this file.
|
| template<typename E , typename = decltype (is_offset_type (std::declval<E> ()))> |
| constexpr std::underlying_type< E >::type | operator+ (E lhs, E rhs)=delete |
| |
| template<typename E , typename = decltype (is_offset_type (std::declval<E> ()))> |
| constexpr std::underlying_type< E >::type | operator- (E lhs, E rhs) |
| |
◆ DEFINE_OFFSET_ARITHM_OP
| #define DEFINE_OFFSET_ARITHM_OP |
( |
|
OP | ) |
|
Value:template<typename E, \
typename = decltype (is_offset_type (std::declval<E> ()))> \
constexpr E \
{ \
return (E) (
static_cast<underlying
> (lhs)
OP rhs); \
} \
\
template<typename E, \
typename = decltype (is_offset_type (std::declval<E> ()))> \
constexpr E \
{ \
return (E) (lhs
OP static_cast<underlying
> (rhs)); \
} \
\
template<typename E, \
typename = decltype (is_offset_type (std::declval<E> ()))> \
E & \
{ \
lhs = (E) (static_cast<underlying> (lhs)
OP rhs); \
return lhs; \
}
Definition at line 95 of file offset-type.h.
◆ DEFINE_OFFSET_REL_OP
| #define DEFINE_OFFSET_REL_OP |
( |
|
OP | ) |
|
Value:template<typename E, \
typename = decltype (is_offset_type (std::declval<E> ()))> \
constexpr bool \
operator
OP (E lhs, E rhs) \
{ \
return (static_cast<underlying> (lhs) \
OP static_cast<underlying> (lhs)); \
}
Definition at line 76 of file offset-type.h.
◆ DEFINE_OFFSET_TYPE
| #define DEFINE_OFFSET_TYPE |
( |
|
TYPE, |
|
|
|
UNDERLYING |
|
) |
| |
Value:enum class TYPE : UNDERLYING {}; \
void is_offset_type (TYPE)
Definition at line 53 of file offset-type.h.
◆ operator+()
template<typename E , typename = decltype (is_offset_type (std::declval<E> ()))>
| constexpr std::underlying_type<E>::type operator+ |
( |
E |
lhs, |
|
|
E |
rhs |
|
) |
| |
|
delete |
◆ operator-()
template<typename E , typename = decltype (is_offset_type (std::declval<E> ()))>
| constexpr std::underlying_type<E>::type operator- |
( |
E |
lhs, |
|
|
E |
rhs |
|
) |
| |