add "LE Device Address" 0x1B to advertising data types
Fork of BLE_API by
SafeBool< T > Class Template Reference
template class SafeBool use CRTP to made boolean conversion easy and correct. More...
#include <SafeBool.h>
Inherits SafeBool_::base.
Public Member Functions | |
operator BoolType_t () const | |
bool operator implementation, derived class has to provide bool toBool() const function. |
Detailed Description
template<typename T>
class SafeBool< T >
template class SafeBool use CRTP to made boolean conversion easy and correct.
Derived class should implement the function bool toBool() const to make this work. Inheritance should be public.
- Template Parameters:
-
T Type of the derived class
class A : public SafeBool<A> { public: // boolean conversion bool toBool() { } }; class B : public SafeBool<B> { public: // boolean conversion bool toBool() const { } }; A a; B b; // will compile if(a) { } // compilation error if(a == b) { }
Definition at line 89 of file SafeBool.h.
Member Function Documentation
operator BoolType_t | ( | ) | const |
bool operator implementation, derived class has to provide bool toBool() const function.
Definition at line 94 of file SafeBool.h.
Generated on Fri Jul 15 2022 20:49:45 by 1.7.2