libstdc++
stdbit.h File Reference

Go to the source code of this file.

Namespaces

namespace  __gnu_cxx

Macros

#define __STDC_ENDIAN_BIG__
#define __STDC_ENDIAN_LITTLE__
#define __STDC_ENDIAN_NATIVE__
#define __STDC_VERSION_STDBIT_H__
#define _GLIBCXX_STDBIT_FUNC(F)

Functions

template<typename _Tp>
_Tp stdc_bit_ceil (_Tp __value)
unsigned char stdc_bit_ceil_uc (unsigned char __value)
unsigned int stdc_bit_ceil_ui (unsigned int __value)
unsigned long int stdc_bit_ceil_ul (unsigned long int __value)
unsigned long long int stdc_bit_ceil_ull (unsigned long long int __value)
unsigned short stdc_bit_ceil_us (unsigned short __value)
template<typename _Tp>
_Tp stdc_bit_floor (_Tp __value)
unsigned char stdc_bit_floor_uc (unsigned char __value)
unsigned int stdc_bit_floor_ui (unsigned int __value)
unsigned long int stdc_bit_floor_ul (unsigned long int __value)
unsigned long long int stdc_bit_floor_ull (unsigned long long int __value)
unsigned short stdc_bit_floor_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_bit_width (_Tp __value)
unsigned int stdc_bit_width_uc (unsigned char __value)
unsigned int stdc_bit_width_ui (unsigned int __value)
unsigned int stdc_bit_width_ul (unsigned long int __value)
unsigned int stdc_bit_width_ull (unsigned long long int __value)
unsigned int stdc_bit_width_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_count_ones (_Tp __value)
unsigned int stdc_count_ones_uc (unsigned char __value)
unsigned int stdc_count_ones_ui (unsigned int __value)
unsigned int stdc_count_ones_ul (unsigned long int __value)
unsigned int stdc_count_ones_ull (unsigned long long int __value)
unsigned int stdc_count_ones_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_count_zeros (_Tp __value)
unsigned int stdc_count_zeros_uc (unsigned char __value)
unsigned int stdc_count_zeros_ui (unsigned int __value)
unsigned int stdc_count_zeros_ul (unsigned long int __value)
unsigned int stdc_count_zeros_ull (unsigned long long int __value)
unsigned int stdc_count_zeros_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_first_leading_one (_Tp __value)
unsigned int stdc_first_leading_one_uc (unsigned char __value)
unsigned int stdc_first_leading_one_ui (unsigned int __value)
unsigned int stdc_first_leading_one_ul (unsigned long int __value)
unsigned int stdc_first_leading_one_ull (unsigned long long int __value)
unsigned int stdc_first_leading_one_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_first_leading_zero (_Tp __value)
unsigned int stdc_first_leading_zero_uc (unsigned char __value)
unsigned int stdc_first_leading_zero_ui (unsigned int __value)
unsigned int stdc_first_leading_zero_ul (unsigned long int __value)
unsigned int stdc_first_leading_zero_ull (unsigned long long int __value)
unsigned int stdc_first_leading_zero_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_first_trailing_one (_Tp __value)
unsigned int stdc_first_trailing_one_uc (unsigned char __value)
unsigned int stdc_first_trailing_one_ui (unsigned int __value)
unsigned int stdc_first_trailing_one_ul (unsigned long int __value)
unsigned int stdc_first_trailing_one_ull (unsigned long long int __value)
unsigned int stdc_first_trailing_one_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_first_trailing_zero (_Tp __value)
unsigned int stdc_first_trailing_zero_uc (unsigned char __value)
unsigned int stdc_first_trailing_zero_ui (unsigned int __value)
unsigned int stdc_first_trailing_zero_ul (unsigned long int __value)
unsigned int stdc_first_trailing_zero_ull (unsigned long long int __value)
unsigned int stdc_first_trailing_zero_us (unsigned short __value)
template<typename _Tp>
bool stdc_has_single_bit (_Tp __value)
bool stdc_has_single_bit_uc (unsigned char __value)
bool stdc_has_single_bit_ui (unsigned int __value)
bool stdc_has_single_bit_ul (unsigned long int __value)
bool stdc_has_single_bit_ull (unsigned long long int __value)
bool stdc_has_single_bit_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_leading_ones (_Tp __value)
unsigned int stdc_leading_ones_uc (unsigned char __value)
unsigned int stdc_leading_ones_ui (unsigned int __value)
unsigned int stdc_leading_ones_ul (unsigned long int __value)
unsigned int stdc_leading_ones_ull (unsigned long long int __value)
unsigned int stdc_leading_ones_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_leading_zeros (_Tp __value)
unsigned int stdc_leading_zeros_uc (unsigned char __value)
unsigned int stdc_leading_zeros_ui (unsigned int __value)
unsigned int stdc_leading_zeros_ul (unsigned long int __value)
unsigned int stdc_leading_zeros_ull (unsigned long long int __value)
unsigned int stdc_leading_zeros_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_trailing_ones (_Tp __value)
unsigned int stdc_trailing_ones_uc (unsigned char __value)
unsigned int stdc_trailing_ones_ui (unsigned int __value)
unsigned int stdc_trailing_ones_ul (unsigned long int __value)
unsigned int stdc_trailing_ones_ull (unsigned long long int __value)
unsigned int stdc_trailing_ones_us (unsigned short __value)
template<typename _Tp>
unsigned int stdc_trailing_zeros (_Tp __value)
unsigned int stdc_trailing_zeros_uc (unsigned char __value)
unsigned int stdc_trailing_zeros_ui (unsigned int __value)
unsigned int stdc_trailing_zeros_ul (unsigned long int __value)
unsigned int stdc_trailing_zeros_ull (unsigned long long int __value)
unsigned int stdc_trailing_zeros_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_leading_zeros (_Tp __value)
unsigned int __gnu_cxx::stdc_leading_zeros_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_leading_zeros_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_leading_zeros_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_leading_zeros_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_leading_zeros_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_leading_ones (_Tp __value)
unsigned int __gnu_cxx::stdc_leading_ones_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_leading_ones_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_leading_ones_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_leading_ones_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_leading_ones_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_trailing_zeros (_Tp __value)
unsigned int __gnu_cxx::stdc_trailing_zeros_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_trailing_zeros_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_trailing_zeros_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_trailing_zeros_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_trailing_zeros_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_trailing_ones (_Tp __value)
unsigned int __gnu_cxx::stdc_trailing_ones_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_trailing_ones_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_trailing_ones_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_trailing_ones_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_trailing_ones_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_leading_zero (_Tp __value)
unsigned int __gnu_cxx::stdc_first_leading_zero_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_first_leading_zero_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_first_leading_zero_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_first_leading_zero_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_first_leading_zero_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_leading_one (_Tp __value)
unsigned int __gnu_cxx::stdc_first_leading_one_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_first_leading_one_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_first_leading_one_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_first_leading_one_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_first_leading_one_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_trailing_zero (_Tp __value)
unsigned int __gnu_cxx::stdc_first_trailing_zero_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_first_trailing_zero_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_first_trailing_zero_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_first_trailing_zero_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_first_trailing_zero_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_trailing_one (_Tp __value)
unsigned int __gnu_cxx::stdc_first_trailing_one_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_first_trailing_one_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_first_trailing_one_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_first_trailing_one_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_first_trailing_one_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_count_zeros (_Tp __value)
unsigned int __gnu_cxx::stdc_count_zeros_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_count_zeros_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_count_zeros_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_count_zeros_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_count_zeros_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_count_ones (_Tp __value)
unsigned int __gnu_cxx::stdc_count_ones_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_count_ones_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_count_ones_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_count_ones_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_count_ones_us (unsigned short __value)
template<typename _Tp>
bool __gnu_cxx::stdc_has_single_bit (_Tp __value)
bool __gnu_cxx::stdc_has_single_bit_uc (unsigned char __value)
bool __gnu_cxx::stdc_has_single_bit_ui (unsigned int __value)
bool __gnu_cxx::stdc_has_single_bit_ul (unsigned long int __value)
bool __gnu_cxx::stdc_has_single_bit_ull (unsigned long long int __value)
bool __gnu_cxx::stdc_has_single_bit_us (unsigned short __value)
template<typename _Tp>
unsigned int __gnu_cxx::stdc_bit_width (_Tp __value)
unsigned int __gnu_cxx::stdc_bit_width_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_bit_width_ui (unsigned int __value)
unsigned int __gnu_cxx::stdc_bit_width_ul (unsigned long int __value)
unsigned int __gnu_cxx::stdc_bit_width_ull (unsigned long long int __value)
unsigned int __gnu_cxx::stdc_bit_width_us (unsigned short __value)
template<typename _Tp>
_Tp __gnu_cxx::stdc_bit_floor (_Tp __value)
unsigned char __gnu_cxx::stdc_bit_floor_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_bit_floor_ui (unsigned int __value)
unsigned long int __gnu_cxx::stdc_bit_floor_ul (unsigned long int __value)
unsigned long long int __gnu_cxx::stdc_bit_floor_ull (unsigned long long int __value)
unsigned short __gnu_cxx::stdc_bit_floor_us (unsigned short __value)
template<typename _Tp>
_Tp __gnu_cxx::stdc_bit_ceil (_Tp __value)
unsigned char __gnu_cxx::stdc_bit_ceil_uc (unsigned char __value)
unsigned int __gnu_cxx::stdc_bit_ceil_ui (unsigned int __value)
unsigned long int __gnu_cxx::stdc_bit_ceil_ul (unsigned long int __value)
unsigned long long int __gnu_cxx::stdc_bit_ceil_ull (unsigned long long int __value)
unsigned short __gnu_cxx::stdc_bit_ceil_us (unsigned short __value)

Detailed Description

This is a Standard C++ Library header.

Definition in file stdbit.h.

Macro Definition Documentation

◆ __STDC_ENDIAN_BIG__

#define __STDC_ENDIAN_BIG__

Definition at line 37 of file stdbit.h.

◆ __STDC_ENDIAN_LITTLE__

#define __STDC_ENDIAN_LITTLE__

Definition at line 38 of file stdbit.h.

◆ __STDC_ENDIAN_NATIVE__

#define __STDC_ENDIAN_NATIVE__

Definition at line 39 of file stdbit.h.

◆ __STDC_VERSION_STDBIT_H__

#define __STDC_VERSION_STDBIT_H__

Definition at line 35 of file stdbit.h.

◆ _GLIBCXX_STDBIT_FUNC

#define _GLIBCXX_STDBIT_FUNC ( F)

Definition at line 557 of file stdbit.h.

Function Documentation

◆ stdc_bit_ceil()

template<typename _Tp>
_Tp __gnu_cxx::stdc_bit_ceil ( _Tp __value)
inline

Bit ceiling

Unlike std::bit_ceil, this is defined to return zero for values which are not representable in the return type.

Parameters
__valueAn unsigned integer.
Returns
The smallest power of two that is not less than __value.
Since
C++26

Definition at line 527 of file stdbit.h.

◆ stdc_bit_ceil_uc()

unsigned char __gnu_cxx::stdc_bit_ceil_uc ( unsigned char __value)
inline

Definition at line 535 of file stdbit.h.

◆ stdc_bit_ceil_ui()

unsigned int __gnu_cxx::stdc_bit_ceil_ui ( unsigned int __value)
inline

Definition at line 543 of file stdbit.h.

◆ stdc_bit_ceil_ul()

unsigned long int __gnu_cxx::stdc_bit_ceil_ul ( unsigned long int __value)
inline

Definition at line 547 of file stdbit.h.

◆ stdc_bit_ceil_ull()

unsigned long long int __gnu_cxx::stdc_bit_ceil_ull ( unsigned long long int __value)
inline

Definition at line 551 of file stdbit.h.

◆ stdc_bit_ceil_us()

unsigned short __gnu_cxx::stdc_bit_ceil_us ( unsigned short __value)
inline

Definition at line 539 of file stdbit.h.

◆ stdc_bit_floor()

template<typename _Tp>
_Tp __gnu_cxx::stdc_bit_floor ( _Tp __value)
inline

Bit floor

Parameters
__valueAn unsigned integer.
Returns
The largest power of two that is not greater than __value.
Since
C++26

Definition at line 488 of file stdbit.h.

◆ stdc_bit_floor_uc()

unsigned char __gnu_cxx::stdc_bit_floor_uc ( unsigned char __value)
inline

Definition at line 495 of file stdbit.h.

◆ stdc_bit_floor_ui()

unsigned int __gnu_cxx::stdc_bit_floor_ui ( unsigned int __value)
inline

Definition at line 503 of file stdbit.h.

◆ stdc_bit_floor_ul()

unsigned long int __gnu_cxx::stdc_bit_floor_ul ( unsigned long int __value)
inline

Definition at line 507 of file stdbit.h.

◆ stdc_bit_floor_ull()

unsigned long long int __gnu_cxx::stdc_bit_floor_ull ( unsigned long long int __value)
inline

Definition at line 511 of file stdbit.h.

◆ stdc_bit_floor_us()

unsigned short __gnu_cxx::stdc_bit_floor_us ( unsigned short __value)
inline

Definition at line 499 of file stdbit.h.

◆ stdc_bit_width()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_bit_width ( _Tp __value)
inline

Bit width

Parameters
__valueAn unsigned integer.
Returns
The minimum number of bits needed to represent __value.
Since
C++26

Definition at line 452 of file stdbit.h.

◆ stdc_bit_width_uc()

unsigned int __gnu_cxx::stdc_bit_width_uc ( unsigned char __value)
inline

Definition at line 459 of file stdbit.h.

◆ stdc_bit_width_ui()

unsigned int __gnu_cxx::stdc_bit_width_ui ( unsigned int __value)
inline

Definition at line 467 of file stdbit.h.

◆ stdc_bit_width_ul()

unsigned int __gnu_cxx::stdc_bit_width_ul ( unsigned long int __value)
inline

Definition at line 471 of file stdbit.h.

◆ stdc_bit_width_ull()

unsigned int __gnu_cxx::stdc_bit_width_ull ( unsigned long long int __value)
inline

Definition at line 475 of file stdbit.h.

◆ stdc_bit_width_us()

unsigned int __gnu_cxx::stdc_bit_width_us ( unsigned short __value)
inline

Definition at line 463 of file stdbit.h.

◆ stdc_count_ones()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_count_ones ( _Tp __value)
inline

Count ones

Parameters
__valueAn unsigned integer.
Returns
The total number of one bits in __value.
Since
C++26

Definition at line 380 of file stdbit.h.

◆ stdc_count_ones_uc()

unsigned int __gnu_cxx::stdc_count_ones_uc ( unsigned char __value)
inline

Definition at line 387 of file stdbit.h.

◆ stdc_count_ones_ui()

unsigned int __gnu_cxx::stdc_count_ones_ui ( unsigned int __value)
inline

Definition at line 395 of file stdbit.h.

◆ stdc_count_ones_ul()

unsigned int __gnu_cxx::stdc_count_ones_ul ( unsigned long int __value)
inline

Definition at line 399 of file stdbit.h.

◆ stdc_count_ones_ull()

unsigned int __gnu_cxx::stdc_count_ones_ull ( unsigned long long int __value)
inline

Definition at line 403 of file stdbit.h.

◆ stdc_count_ones_us()

unsigned int __gnu_cxx::stdc_count_ones_us ( unsigned short __value)
inline

Definition at line 391 of file stdbit.h.

◆ stdc_count_zeros()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_count_zeros ( _Tp __value)
inline

Count zeros

Parameters
__valueAn unsigned integer.
Returns
The total number of zero bits in __value.
Since
C++26

Definition at line 344 of file stdbit.h.

◆ stdc_count_zeros_uc()

unsigned int __gnu_cxx::stdc_count_zeros_uc ( unsigned char __value)
inline

Definition at line 351 of file stdbit.h.

◆ stdc_count_zeros_ui()

unsigned int __gnu_cxx::stdc_count_zeros_ui ( unsigned int __value)
inline

Definition at line 359 of file stdbit.h.

◆ stdc_count_zeros_ul()

unsigned int __gnu_cxx::stdc_count_zeros_ul ( unsigned long int __value)
inline

Definition at line 363 of file stdbit.h.

◆ stdc_count_zeros_ull()

unsigned int __gnu_cxx::stdc_count_zeros_ull ( unsigned long long int __value)
inline

Definition at line 367 of file stdbit.h.

◆ stdc_count_zeros_us()

unsigned int __gnu_cxx::stdc_count_zeros_us ( unsigned short __value)
inline

Definition at line 355 of file stdbit.h.

◆ stdc_first_leading_one()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_leading_one ( _Tp __value)
inline

Find the leftmost (i.e. most significant) one bit

Parameters
__valueAn unsigned integer.
Returns
The one-based index of the first one bit counting from the left, or zero if there are no one bits.
Since
C++26

Definition at line 234 of file stdbit.h.

◆ stdc_first_leading_one_uc()

unsigned int __gnu_cxx::stdc_first_leading_one_uc ( unsigned char __value)
inline

Definition at line 241 of file stdbit.h.

◆ stdc_first_leading_one_ui()

unsigned int __gnu_cxx::stdc_first_leading_one_ui ( unsigned int __value)
inline

Definition at line 249 of file stdbit.h.

◆ stdc_first_leading_one_ul()

unsigned int __gnu_cxx::stdc_first_leading_one_ul ( unsigned long int __value)
inline

Definition at line 253 of file stdbit.h.

◆ stdc_first_leading_one_ull()

unsigned int __gnu_cxx::stdc_first_leading_one_ull ( unsigned long long int __value)
inline

Definition at line 257 of file stdbit.h.

◆ stdc_first_leading_one_us()

unsigned int __gnu_cxx::stdc_first_leading_one_us ( unsigned short __value)
inline

Definition at line 245 of file stdbit.h.

◆ stdc_first_leading_zero()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_leading_zero ( _Tp __value)
inline

Find the leftmost (i.e. most significant) zero bit

Parameters
__valueAn unsigned integer.
Returns
The one-based index of the first zero bit counting from the left, or zero if there are no zero bits.
Since
C++26

Definition at line 197 of file stdbit.h.

◆ stdc_first_leading_zero_uc()

unsigned int __gnu_cxx::stdc_first_leading_zero_uc ( unsigned char __value)
inline

Definition at line 204 of file stdbit.h.

◆ stdc_first_leading_zero_ui()

unsigned int __gnu_cxx::stdc_first_leading_zero_ui ( unsigned int __value)
inline

Definition at line 212 of file stdbit.h.

◆ stdc_first_leading_zero_ul()

unsigned int __gnu_cxx::stdc_first_leading_zero_ul ( unsigned long int __value)
inline

Definition at line 216 of file stdbit.h.

◆ stdc_first_leading_zero_ull()

unsigned int __gnu_cxx::stdc_first_leading_zero_ull ( unsigned long long int __value)
inline

Definition at line 220 of file stdbit.h.

◆ stdc_first_leading_zero_us()

unsigned int __gnu_cxx::stdc_first_leading_zero_us ( unsigned short __value)
inline

Definition at line 208 of file stdbit.h.

◆ stdc_first_trailing_one()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_trailing_one ( _Tp __value)
inline

Find the rightmost (i.e. least significant) one bit

Parameters
__valueAn unsigned integer.
Returns
The one-based index of the first one bit counting from the right, or zero if there are no one bits.
Since
C++26

Definition at line 308 of file stdbit.h.

◆ stdc_first_trailing_one_uc()

unsigned int __gnu_cxx::stdc_first_trailing_one_uc ( unsigned char __value)
inline

Definition at line 315 of file stdbit.h.

◆ stdc_first_trailing_one_ui()

unsigned int __gnu_cxx::stdc_first_trailing_one_ui ( unsigned int __value)
inline

Definition at line 323 of file stdbit.h.

◆ stdc_first_trailing_one_ul()

unsigned int __gnu_cxx::stdc_first_trailing_one_ul ( unsigned long int __value)
inline

Definition at line 327 of file stdbit.h.

◆ stdc_first_trailing_one_ull()

unsigned int __gnu_cxx::stdc_first_trailing_one_ull ( unsigned long long int __value)
inline

Definition at line 331 of file stdbit.h.

◆ stdc_first_trailing_one_us()

unsigned int __gnu_cxx::stdc_first_trailing_one_us ( unsigned short __value)
inline

Definition at line 319 of file stdbit.h.

◆ stdc_first_trailing_zero()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_first_trailing_zero ( _Tp __value)
inline

Find the rightmost (i.e. least significant) zero bit

Parameters
__valueAn unsigned integer.
Returns
The one-based index of the first zero bit counting from the right, or zero if there are no zero bits.
Since
C++26

Definition at line 271 of file stdbit.h.

◆ stdc_first_trailing_zero_uc()

unsigned int __gnu_cxx::stdc_first_trailing_zero_uc ( unsigned char __value)
inline

Definition at line 278 of file stdbit.h.

◆ stdc_first_trailing_zero_ui()

unsigned int __gnu_cxx::stdc_first_trailing_zero_ui ( unsigned int __value)
inline

Definition at line 286 of file stdbit.h.

◆ stdc_first_trailing_zero_ul()

unsigned int __gnu_cxx::stdc_first_trailing_zero_ul ( unsigned long int __value)
inline

Definition at line 290 of file stdbit.h.

◆ stdc_first_trailing_zero_ull()

unsigned int __gnu_cxx::stdc_first_trailing_zero_ull ( unsigned long long int __value)
inline

Definition at line 294 of file stdbit.h.

◆ stdc_first_trailing_zero_us()

unsigned int __gnu_cxx::stdc_first_trailing_zero_us ( unsigned short __value)
inline

Definition at line 282 of file stdbit.h.

◆ stdc_has_single_bit()

template<typename _Tp>
bool __gnu_cxx::stdc_has_single_bit ( _Tp __value)
inline

Power of two check

Parameters
__valueAn unsigned integer.
Returns
True if the value has a single bit set, false otherwise.
Since
C++26

Definition at line 416 of file stdbit.h.

◆ stdc_has_single_bit_uc()

bool __gnu_cxx::stdc_has_single_bit_uc ( unsigned char __value)
inline

Definition at line 423 of file stdbit.h.

◆ stdc_has_single_bit_ui()

bool __gnu_cxx::stdc_has_single_bit_ui ( unsigned int __value)
inline

Definition at line 431 of file stdbit.h.

◆ stdc_has_single_bit_ul()

bool __gnu_cxx::stdc_has_single_bit_ul ( unsigned long int __value)
inline

Definition at line 435 of file stdbit.h.

◆ stdc_has_single_bit_ull()

bool __gnu_cxx::stdc_has_single_bit_ull ( unsigned long long int __value)
inline

Definition at line 439 of file stdbit.h.

◆ stdc_has_single_bit_us()

bool __gnu_cxx::stdc_has_single_bit_us ( unsigned short __value)
inline

Definition at line 427 of file stdbit.h.

◆ stdc_leading_ones()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_leading_ones ( _Tp __value)
inline

Count the number of leading one bits

Parameters
__valueAn unsigned integer.
Since
C++26

Definition at line 90 of file stdbit.h.

◆ stdc_leading_ones_uc()

unsigned int __gnu_cxx::stdc_leading_ones_uc ( unsigned char __value)
inline

Definition at line 97 of file stdbit.h.

◆ stdc_leading_ones_ui()

unsigned int __gnu_cxx::stdc_leading_ones_ui ( unsigned int __value)
inline

Definition at line 105 of file stdbit.h.

◆ stdc_leading_ones_ul()

unsigned int __gnu_cxx::stdc_leading_ones_ul ( unsigned long int __value)
inline

Definition at line 109 of file stdbit.h.

◆ stdc_leading_ones_ull()

unsigned int __gnu_cxx::stdc_leading_ones_ull ( unsigned long long int __value)
inline

Definition at line 113 of file stdbit.h.

◆ stdc_leading_ones_us()

unsigned int __gnu_cxx::stdc_leading_ones_us ( unsigned short __value)
inline

Definition at line 101 of file stdbit.h.

◆ stdc_leading_zeros()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_leading_zeros ( _Tp __value)
inline

Count the number of leading zero bits

Parameters
__valueAn unsigned integer.
Since
C++26

Definition at line 55 of file stdbit.h.

◆ stdc_leading_zeros_uc()

unsigned int __gnu_cxx::stdc_leading_zeros_uc ( unsigned char __value)
inline

Definition at line 62 of file stdbit.h.

◆ stdc_leading_zeros_ui()

unsigned int __gnu_cxx::stdc_leading_zeros_ui ( unsigned int __value)
inline

Definition at line 70 of file stdbit.h.

◆ stdc_leading_zeros_ul()

unsigned int __gnu_cxx::stdc_leading_zeros_ul ( unsigned long int __value)
inline

Definition at line 74 of file stdbit.h.

◆ stdc_leading_zeros_ull()

unsigned int __gnu_cxx::stdc_leading_zeros_ull ( unsigned long long int __value)
inline

Definition at line 78 of file stdbit.h.

◆ stdc_leading_zeros_us()

unsigned int __gnu_cxx::stdc_leading_zeros_us ( unsigned short __value)
inline

Definition at line 66 of file stdbit.h.

◆ stdc_trailing_ones()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_trailing_ones ( _Tp __value)
inline

Count the number of trailing one bits

Parameters
__valueAn unsigned integer.
Since
C++26

Definition at line 160 of file stdbit.h.

◆ stdc_trailing_ones_uc()

unsigned int __gnu_cxx::stdc_trailing_ones_uc ( unsigned char __value)
inline

Definition at line 167 of file stdbit.h.

◆ stdc_trailing_ones_ui()

unsigned int __gnu_cxx::stdc_trailing_ones_ui ( unsigned int __value)
inline

Definition at line 175 of file stdbit.h.

◆ stdc_trailing_ones_ul()

unsigned int __gnu_cxx::stdc_trailing_ones_ul ( unsigned long int __value)
inline

Definition at line 179 of file stdbit.h.

◆ stdc_trailing_ones_ull()

unsigned int __gnu_cxx::stdc_trailing_ones_ull ( unsigned long long int __value)
inline

Definition at line 183 of file stdbit.h.

◆ stdc_trailing_ones_us()

unsigned int __gnu_cxx::stdc_trailing_ones_us ( unsigned short __value)
inline

Definition at line 171 of file stdbit.h.

◆ stdc_trailing_zeros()

template<typename _Tp>
unsigned int __gnu_cxx::stdc_trailing_zeros ( _Tp __value)
inline

Count the number of trailing zero bits

Parameters
__valueAn unsigned integer.
Since
C++26

Definition at line 125 of file stdbit.h.

◆ stdc_trailing_zeros_uc()

unsigned int __gnu_cxx::stdc_trailing_zeros_uc ( unsigned char __value)
inline

Definition at line 132 of file stdbit.h.

◆ stdc_trailing_zeros_ui()

unsigned int __gnu_cxx::stdc_trailing_zeros_ui ( unsigned int __value)
inline

Definition at line 140 of file stdbit.h.

◆ stdc_trailing_zeros_ul()

unsigned int __gnu_cxx::stdc_trailing_zeros_ul ( unsigned long int __value)
inline

Definition at line 144 of file stdbit.h.

◆ stdc_trailing_zeros_ull()

unsigned int __gnu_cxx::stdc_trailing_zeros_ull ( unsigned long long int __value)
inline

Definition at line 148 of file stdbit.h.

◆ stdc_trailing_zeros_us()

unsigned int __gnu_cxx::stdc_trailing_zeros_us ( unsigned short __value)
inline

Definition at line 136 of file stdbit.h.