5 #ifndef DUNE_ENUMSET_HH 6 #define DUNE_ENUMSET_HH 59 template<
typename TA,
int item>
78 template<
typename TA,
int from,
int end>
98 typedef typename S::Type
Type;
109 template<
class TI1,
class TI2,
typename TA=
typename TI1::Type>
113 static bool contains(
const TA& item);
116 template<
typename TA>
122 template<
typename TA>
128 template<
typename TA,
int i>
134 template<
typename TA,
int i>
135 inline std::ostream& operator<<(std::ostream& os, const EnumItem<TA,i>&)
140 template<
typename TA,
int from,
int to>
143 return from<=item && item<=to;
146 template<
typename TA,
int from,
int to>
147 inline std::ostream& operator<<(std::ostream& os, const EnumRange<TA,from,to>&)
149 return os<<
"["<<from<<
" - "<<to<<
"]";
152 template<
class TI1,
class TI2,
typename TA>
159 template<
class TI1,
class TI2>
161 [[maybe_unused]]
const TI2& set2)
166 template<
class TI1,
class TI2,
class T>
167 inline std::ostream& operator<<(std::ostream& os, const Combine<TI1,TI2,T>&)
169 return os << TI1()<<
" "<<TI2();
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
TA Type
The POD type the set holds.
Definition: enumset.hh:32
TA Type
The type the set holds.
Definition: enumset.hh:66
static bool contains(const Type &item)
Definition: enumset.hh:141
A set containing everything.
Definition: enumset.hh:43
static bool contains(const Type &attribute)
Always returns true.
Definition: enumset.hh:123
static bool contains(const Type &attribute)
Tests whether an item is in the set.
Definition: enumset.hh:129
A set representing a range including the borders.
Definition: enumset.hh:79
I i
Definition: hybridmultiindex.hh:328
S::Type Type
Definition: enumset.hh:98
Dune namespace
Definition: alignedallocator.hh:12
TA Type
The type the set holds.
Definition: enumset.hh:85
An empty set.
Definition: enumset.hh:26
A set combining two other sets.
Definition: enumset.hh:110
Combine< TI1, TI2, typename TI1::Type > combine([[maybe_unused]] const TI1 &set1, [[maybe_unused]] const TI2 &set2)
Definition: enumset.hh:160
A set consisting only of one item.
Definition: enumset.hh:60
TA Type
The POD type the set holds.
Definition: enumset.hh:49
The negation of a set. An item is contained in the set if and only if it is not contained in the nega...
Definition: enumset.hh:95
static bool contains(const TA &item)
Definition: enumset.hh:153
static bool contains(const Type &item)
Definition: enumset.hh:100
static bool contains(const Type &attribute)
Always returns false.
Definition: enumset.hh:117