39#ifndef _GLIBCXX_CSTDDEF
40#define _GLIBCXX_CSTDDEF 1
43#pragma GCC system_header
47#undef __need_ptrdiff_t
54#define __glibcxx_want_byte
57#pragma GCC diagnostic push
58#pragma GCC diagnostic ignored "-Wpedantic"
62#if __cplusplus >= 201103L
73_GLIBCXX_BEGIN_NAMESPACE_VERSION
75 enum class byte :
unsigned char {};
77 template<
typename _IntegerType>
struct __byte_operand { };
78 template<>
struct __byte_operand<bool> {
using __type = byte; };
79 template<>
struct __byte_operand<char> {
using __type = byte; };
80 template<>
struct __byte_operand<signed char> {
using __type = byte; };
81 template<>
struct __byte_operand<unsigned char> {
using __type = byte; };
82 template<>
struct __byte_operand<wchar_t> {
using __type = byte; };
83#ifdef _GLIBCXX_USE_CHAR8_T
84 template<>
struct __byte_operand<char8_t> {
using __type = byte; };
86 template<>
struct __byte_operand<char16_t> {
using __type = byte; };
87 template<>
struct __byte_operand<char32_t> {
using __type = byte; };
88 template<>
struct __byte_operand<short> {
using __type = byte; };
89 template<>
struct __byte_operand<unsigned short> {
using __type = byte; };
90 template<>
struct __byte_operand<int> {
using __type = byte; };
91 template<>
struct __byte_operand<unsigned int> {
using __type = byte; };
92 template<>
struct __byte_operand<long> {
using __type = byte; };
93 template<>
struct __byte_operand<unsigned long> {
using __type = byte; };
94 template<>
struct __byte_operand<long long> {
using __type = byte; };
95 template<>
struct __byte_operand<unsigned long long> {
using __type = byte; };
96#if defined(__GLIBCXX_TYPE_INT_N_0)
97 template<>
struct __byte_operand<__GLIBCXX_TYPE_INT_N_0>
98 {
using __type = byte; };
99 template<>
struct __byte_operand<unsigned __GLIBCXX_TYPE_INT_N_0>
100 {
using __type = byte; };
102#if defined(__GLIBCXX_TYPE_INT_N_1)
103 template<>
struct __byte_operand<__GLIBCXX_TYPE_INT_N_1>
104 {
using __type = byte; };
105 template<>
struct __byte_operand<unsigned __GLIBCXX_TYPE_INT_N_1>
106 {
using __type = byte; };
108#if defined(__GLIBCXX_TYPE_INT_N_2)
109 template<>
struct __byte_operand<__GLIBCXX_TYPE_INT_N_2>
110 {
using __type = byte; };
111 template<>
struct __byte_operand<unsigned __GLIBCXX_TYPE_INT_N_2>
112 {
using __type = byte; };
114 template<
typename _IntegerType>
115 struct __byte_operand<const _IntegerType>
116 : __byte_operand<_IntegerType> { };
117 template<
typename _IntegerType>
118 struct __byte_operand<volatile _IntegerType>
119 : __byte_operand<_IntegerType> { };
120 template<
typename _IntegerType>
121 struct __byte_operand<const volatile _IntegerType>
122 : __byte_operand<_IntegerType> { };
124 template<
typename _IntegerType>
125 using __byte_op_t =
typename __byte_operand<_IntegerType>::__type;
127 template<
typename _IntegerType>
128 [[__gnu__::__always_inline__]]
129 constexpr __byte_op_t<_IntegerType>
130 operator<<(
byte __b, _IntegerType __shift)
noexcept
131 {
return (
byte)(
unsigned char)((
unsigned)__b << __shift); }
133 template<
typename _IntegerType>
134 [[__gnu__::__always_inline__]]
135 constexpr __byte_op_t<_IntegerType>
136 operator>>(
byte __b, _IntegerType __shift)
noexcept
137 {
return (
byte)(
unsigned char)((
unsigned)__b >> __shift); }
139 [[__gnu__::__always_inline__]]
142 {
return (
byte)(
unsigned char)((
unsigned)__l | (unsigned)__r); }
144 [[__gnu__::__always_inline__]]
147 {
return (
byte)(
unsigned char)((
unsigned)__l & (unsigned)__r); }
149 [[__gnu__::__always_inline__]]
152 {
return (
byte)(
unsigned char)((
unsigned)__l ^ (unsigned)__r); }
154 [[__gnu__::__always_inline__]]
156 operator~(
byte __b)
noexcept
157 {
return (
byte)(
unsigned char)~(
unsigned)__b; }
159 template<
typename _IntegerType>
160 [[__gnu__::__always_inline__]]
161 constexpr __byte_op_t<_IntegerType>&
162 operator<<=(
byte& __b, _IntegerType __shift)
noexcept
163 {
return __b = __b << __shift; }
165 template<
typename _IntegerType>
166 [[__gnu__::__always_inline__]]
167 constexpr __byte_op_t<_IntegerType>&
168 operator>>=(
byte& __b, _IntegerType __shift)
noexcept
169 {
return __b = __b >> __shift; }
171 [[__gnu__::__always_inline__]]
173 operator|=(
byte& __l,
byte __r)
noexcept
174 {
return __l = __l | __r; }
176 [[__gnu__::__always_inline__]]
178 operator&=(
byte& __l,
byte __r)
noexcept
179 {
return __l = __l & __r; }
181 [[__gnu__::__always_inline__]]
183 operator^=(
byte& __l,
byte __r)
noexcept
184 {
return __l = __l ^ __r; }
186 template<
typename _IntegerType>
187 [[nodiscard,__gnu__::__always_inline__]]
188 constexpr _IntegerType
189 to_integer(__byte_op_t<_IntegerType> __b)
noexcept
190 {
return _IntegerType(__b); }
192_GLIBCXX_END_NAMESPACE_VERSION
197#pragma GCC diagnostic pop
ISO C++ entities toplevel namespace is std.
constexpr bitset< _Nb > operator^(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
std::basic_ostream< _CharT, _Traits > & operator<<(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb > &__x)
Global I/O operators for bitsets.
constexpr bitset< _Nb > operator|(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.
constexpr bitset< _Nb > operator&(const bitset< _Nb > &__x, const bitset< _Nb > &__y) noexcept
Global bitwise operations on bitsets.