19 #ifndef BLE_SAFE_ENUM_H_ 20 #define BLE_SAFE_ENUM_H_ 110 template<
typename Target,
typename LayoutType =
unsigned int>
134 return lhs._value == rhs._value;
147 return !(lhs == rhs);
159 return lhs.value() < rhs.value();
172 return lhs.value() < rhs.value() || lhs == rhs;
185 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.