19#ifndef BLE_API_SAFE_BOOL_H_
20#define BLE_API_SAFE_BOOL_H_
121 return (
static_cast<const T*
>(
this))->toBool()
131template <
typename T,
typename U>
143template <
typename T,
typename U>
Base class of all SafeBool instances.
void(base::* BoolType_t)() const
The bool type is a pointer to method that can be used in boolean context.
void trueTag() const
Special member function that indicates a true value.
void invalidTag() const
Nonimplemented call, use to disallow conversion between unrelated types.
Safe conversion of objects in boolean context.
void operator!=(const SafeBool< T > &lhs, const SafeBool< U > &rhs)
Avoid conversion to bool between different classes.
void operator==(const SafeBool< T > &lhs, const SafeBool< U > &rhs)
Avoid conversion to bool between different classes.
Private namespace used to host details of the SafeBool implementation.