Loading...
Searching...
No Matches
terra::util::FlagLike Concept Reference

Concept for types that behave like bitmask flags. More...

#include <bit_masking.hpp>

Concept definition

template<typename E>
concept terra::util::FlagLike = std::is_enum_v< E > && std::unsigned_integral< std::underlying_type_t< E > > &&
( static_cast< std::underlying_type_t< E > >( E::NO_FLAG ) == 0 )
Concept for types that behave like bitmask flags.
Definition bit_masking.hpp:17

Detailed Description

Concept for types that behave like bitmask flags.

This concept checks if a type E is an enum with an unsigned integral underlying type, has a NO_FLAG value equal to 0, and supports bitwise OR (|) and AND (&) operations.

Template Parameters
EThe enum type to check.