17 #ifndef BLE_SAFE_ENUM_H_ 18 #define BLE_SAFE_ENUM_H_ 108 template<
typename Target,
typename LayoutType =
unsigned int>
132 return lhs._value == rhs._value;
145 return !(lhs == rhs);
157 return lhs.value() < rhs.value();
170 return lhs.value() < rhs.value() || lhs == rhs;
183 return !(lhs <= rhs);
friend bool operator==(Target lhs, Target rhs)
Equal to operator for Target instances.
friend bool operator>=(Target lhs, Target rhs)
Greater than or equal to operator for Target instances.
const LayoutType * storage() const
Return a pointer to the inner storage.
LayoutType value() const
Explicit access to the inner value of the SafeEnum instance.
Helper class used to define safe enumerations.
SafeEnum(LayoutType value)
Construction of an enumeration value.
friend bool operator>(Target lhs, Target rhs)
Greater than operator for Target instances.
LayoutType representation_t
Type of the representation.
friend bool operator!=(Target lhs, Target rhs)
Not equal to operator for Target instances.
friend bool operator<=(Target lhs, Target rhs)
Less than or equal to operator for Target instances.
friend bool operator<(Target lhs, Target rhs)
Less than operator for Target instances.
Entry namespace for all BLE API definitions.