Lines Matching defs:set
15 // A poor man's version of STL's bitset: A bit set of enums E (without explicit
34 constexpr bool contains_any(EnumSet set) const {
35 return (bits_ & set.bits_) != 0;
38 void Add(EnumSet set) { bits_ |= set.bits_; }
40 void Remove(EnumSet set) { bits_ &= ~set.bits_; }
42 void Intersect(EnumSet set) { bits_ &= set.bits_; }
45 constexpr bool operator==(EnumSet set) const { return bits_ == set.bits_; }
46 constexpr bool operator!=(EnumSet set) const { return bits_ != set.bits_; }
48 constexpr EnumSet operator|(EnumSet set) const {
49 return EnumSet(bits_ | set.bits_);
51 constexpr EnumSet operator&(EnumSet set) const {
52 return EnumSet(bits_ & set.bits_);
54 constexpr EnumSet operator-(EnumSet set) const {
55 return EnumSet(bits_ & ~set.bits_);
58 EnumSet& operator|=(EnumSet set) { return *this = *this | set; }
59 EnumSet& operator&=(EnumSet set) { return *this = *this & set; }
60 EnumSet& operator-=(EnumSet set) { return *this = *this - set; }