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

Function AsBit

Tests/Data/Types/EnumMaskTest.cpp:60–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58
59template<typename MaskType, typename EnumType>
60constexpr MaskType AsBit(EnumType e) noexcept
61{
62 return MaskType{ 1 } << static_cast<MaskType>(e);
63}
64
65template<typename MaskType, typename EnumType>
66constexpr MaskType AsMask(std::initializer_list<EnumType> bits) noexcept

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected