OSVR-Core
|
CRTP base for classes of service, useful for accepting classes of service for an argument without letting just any old type through. More...
#include <NetworkClassOfService.h>
Public Types | |
typedef ClassOfService | type |
typedef ClassOfServiceBase< ClassOfService > | base_type |
Public Member Functions | |
ClassOfServiceBase () | |
This inline implementation MUST remain at the bottom of this file. More... | |
CRTP base for classes of service, useful for accepting classes of service for an argument without letting just any old type through.
|
inline |
This inline implementation MUST remain at the bottom of this file.
It consists entirely of compile time checks, so it is effectively removed from the code once the conditions are verified.
Partially enforce the Curiously-Recurring Template Pattern. The assertion here is that for some ClassOfServiceBase<X>
, there exists a class X : public ClassOfServiceBase<X> {};
Doesn't prevent inheriting from the wrong base (class X : public ClassOfServiceBase<Y> {};
where there is already a class Y : public ClassOfServiceBase<Y> {};
)