#pragma once #include #include namespace mbgl { template constexpr Enum operator|(Enum a, Enum b) { static_assert(std::is_enum_v, "Enum must be an enum type"); return Enum(mbgl::underlying_type(a) | mbgl::underlying_type(b)); } template constexpr Enum& operator|=(Enum& a, Enum b) { static_assert(std::is_enum_v, "Enum must be an enum type"); return (a = a | b); } template constexpr bool operator&(Enum a, Enum b) { static_assert(std::is_enum_v, "Enum must be an enum type"); return bool(mbgl::underlying_type(a) & mbgl::underlying_type(b)); } template constexpr Enum operator~(Enum value) { static_assert(std::is_enum_v, "Enum must be an enum type"); return Enum(~mbgl::underlying_type(value)); } } // namespace mbgl