Go to the source code of this file.
◆ SEN_STRONG_TYPE
| #define SEN_STRONG_TYPE |
( |
| name, |
|
|
| native_type ) |
Value:
{ \
using Base::Base; \
using Base::ValueType; \
};
CRTP class that wraps T to make it a strong type.
Definition strong_type.h:72
Helper macro to define strong types. NOLINTNEXTLINE.
◆ SEN_STRONG_TYPE_HASHABLE
| #define SEN_STRONG_TYPE_HASHABLE |
( |
| name | ) |
|
Value:template <> \
struct std::hash<name> \
{ \
inline std::size_t operator()(const name& val) const noexcept { return std::hash<name::ValueType> {}(val.get()); } \
};
Makes your strong type std::hashable. NOLINTNEXTLINE.