8#ifndef QU_GLOBAL_UTILS_H
9#define QU_GLOBAL_UTILS_H
21 static_assert(std::is_enum<T>::value,
22 "template parameter is not an enum type");
24 return static_cast<T>(
static_cast<int>(
lhs) |
static_cast<int>(
rhs));
31 static_assert(std::is_enum<T>::value,
32 "template parameter is not an enum type");
34 return static_cast<T>(
static_cast<int>(
lhs) &
static_cast<int>(
rhs));
41 static_assert(std::is_enum<T>::value,
42 "template parameter is not an enum type");
44 return static_cast<T>(
static_cast<int>(
lhs) >>
static_cast<int>(
rhs));
51 static_assert(std::is_enum<T>::value,
52 "template parameter is not an enum type");
54 return static_cast<T>(
static_cast<int>(
lhs) <<
static_cast<int>(
rhs));
61 static_assert(std::is_enum<T>::value,
62 "template parameter is not an enum type");
71 static_assert(std::is_enum<T>::value,
72 "template parameter is not an enum type");
74 return static_cast<T>(
static_cast<int>(
lhs) ^
static_cast<int>(
rhs));
141#define H_8 static_type_hash_8
144#define H_16 static_type_hash_16
147#define H_32 static_type_hash_32
150#define debug_assert(C, M) Q_ASSERT(C && M)
void gen(int size, QByteArray &result)
constexpr T operator>>(T lhs, T rhs)
void QUASARAPPSHARED_EXPORT randomArray(int size, QByteArray &result)
randomArray This function return random arrat with size size
constexpr T operator^(T lhs, T rhs)
constexpr T operator&(T lhs, T rhs)
uint16_t static_type_hash_16() noexcept
static_type_hash_16 This function return hash code of the class T. For get more information see the s...
uint8_t static_type_hash_8() noexcept
static_type_hash_8 This function return hash code of the class T. For get more information see the st...
constexpr T operator~(T lhs)
constexpr T operator<<(T lhs, T rhs)
constexpr T operator|(T lhs, T rhs)
uint32_t static_type_hash_32() noexcept
static_type_hash_32 This function return hash code of the class T. For get more information see the s...
#define QUASARAPPSHARED_EXPORT