29 #ifndef _GLIBCXX_TR2_BOOL_SET 30 #define _GLIBCXX_TR2_BOOL_SET 1 32 #pragma GCC system_header 37 namespace std _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
62 constexpr
bool_set(
bool __t) : _M_b(_Bool_set_val(__t)) { }
70 {
return __b._M_b == _M_b; }
74 {
return _M_b == _S_empty; }
78 {
return _M_b == _S_indet; }
82 {
return _M_b == _S_false || _M_b == _S_true_; }
111 {
return __b._M_not(); }
115 {
return __s._M_xor(__t); }
119 {
return __s._M_or(__t); }
123 {
return __s._M_and(__t); }
127 {
return __s._M_eq(__t); }
132 template<
typename CharT,
typename Traits>
134 operator<<(std::basic_ostream<CharT, Traits>& __out,
bool_set __b)
140 template<
typename CharT,
typename Traits>
146 if (__c >= _S_false && __c < _S_empty)
147 __b._M_b =
static_cast<_Bool_set_val
>(__c);
153 enum _Bool_set_val:
unsigned char 165 bool_set(_Bool_set_val __c) : _M_b(__c) { }
169 {
return _S_not[this->_M_b]; }
173 {
return _S_xor[this->_M_b][__b._M_b]; }
177 {
return _S_or[this->_M_b][__b._M_b]; }
181 {
return _S_and[this->_M_b][__b._M_b]; }
185 {
return _S_eq[this->_M_b][__b._M_b]; }
188 static _Bool_set_val _S_not[4];
191 static _Bool_set_val _S_xor[4][4];
194 static _Bool_set_val _S_or[4][4];
197 static _Bool_set_val _S_and[4][4];
200 static _Bool_set_val _S_eq[4][4];
207 {
return __s.contains(__t); }
211 {
return __s.
equals(__t); }
227 {
return ! __b.contains(
false); }
231 {
return __b.contains(
true); }
246 {
return __s | __t; }
249 set_intersection(
bool __s,
bool_set __t)
253 set_intersection(
bool_set __s,
bool __t)
258 {
return __s & __t; }
304 {
return ! (__s == __t); }
308 {
return ! (__s == __t); }
312 {
return ! (__s == __t); }
315 _GLIBCXX_END_NAMESPACE_VERSION
320 #endif // _GLIBCXX_TR2_BOOL_SET Template class basic_istream.
bool equals(bool_set __b) const
Return true if states are equal.
bool is_emptyset() const
Return true if this is empty.
ISO C++ entities toplevel namespace is std.
constexpr bool_set(bool __t)
Constructor from bool.
Thrown during incorrect typecasting.If you attempt an invalid dynamic_cast expression, an instance of this class (or something derived from this class) is thrown.
Template class basic_ostream.
constexpr bool_set()
Default constructor.
bitset< _Nb > operator &(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
bool is_singleton() const
Return true if this is false or true (normal boolean).
bool is_indeterminate() const
Return true if this is indeterminate.