MCPcopy Create free account
hub / github.com/MethanePowered/MethaneKit / AsMask

Function AsMask

Tests/Data/Types/EnumMaskTest.cpp:66–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65template<typename MaskType, typename EnumType>
66constexpr MaskType AsMask(std::initializer_list<EnumType> bits) noexcept
67{
68 MaskType mask{};
69 for(EnumType bit : bits)
70 mask |= AsBit<MaskType>(bit);
71 return mask;
72}
73
74#define MASK_TYPES int32_t, uint32_t, int64_t, uint64_t
75

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected