Zserio C++ runtime library  1.1.0
Built for Zserio 2.15.0
BuiltInOperators.h
Go to the documentation of this file.
1 #ifndef ZSERIO_BUILTIN_BUILT_IN_OPERATORS_H_INC
2 #define ZSERIO_BUILTIN_BUILT_IN_OPERATORS_H_INC
3 
4 #include "zserio/Types.h"
5 
6 namespace zserio
7 {
8 
9 namespace builtin
10 {
11 
22 template <typename BITMASK1, typename BITMASK2>
23 bool isSet(BITMASK1 bitmaskValue, BITMASK2 requiredMask)
24 {
25  return (bitmaskValue & requiredMask) == requiredMask;
26 }
27 
48 uint8_t numBits(uint64_t numValues);
49 
50 } // namespace builtin
51 
52 } // namespace zserio
53 
54 #endif // ifndef ZSERIO_BUILTIN_BUILT_IN_OPERATORS_H_INC
uint8_t numBits(uint64_t numValues)
bool isSet(BITMASK1 bitmaskValue, BITMASK2 requiredMask)