Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      Standard library header <stdbit.h> (C23)

      From cppreference.com
      <c‎ |header
       
       
       

      This header is part of thenumeric library, in particular, it provides macros and functions to work with thebyte ordering andbyte and bit representation of C objects.

      Functions

      counts the number of consecutive0 bits, starting from the most significant bit
      (type-generic function macro)[edit]
      counts the number of consecutive1 bits, starting from the most significant bit
      (type-generic function macro)[edit]
      counts the number of consecutive0 bits, starting from the least significant bit
      (type-generic function macro)[edit]
      counts the number of consecutive1 bits, starting from the least significant bit
      (type-generic function macro)[edit]
      finds the first position of0 bit, starting from the most significant bit
      (type-generic function macro)[edit]
      finds the first position of1 bit, starting from the most significant bit
      (type-generic function macro)[edit]
      finds the first position of0 bit, starting from the least significant bit
      (type-generic function macro)[edit]
      finds the first position of1 bit, starting from the least significant bit
      (type-generic function macro)[edit]
      counts the number of0 bits in an unsigned integer
      (type-generic function macro)[edit]
      counts the number of1 bits in an unsigned integer
      (type-generic function macro)[edit]
      checks if a number is an integral power of2
      (type-generic function macro)[edit]
      finds the smallest number of bits needed to represent the given value
      (type-generic function macro)[edit]
      finds the largest integral power of2 not greater than the given value
      (type-generic function macro)[edit]
      finds the smallest integral power of2 not less than the given value
      (type-generic function macro)[edit]

      Macro constants

      indicates the endianness of scalar types
      (macro constant)[edit]

      [edit]Synopsis

      #define __STDC_VERSION_STDBIT_H__ 202311L #define __STDC_ENDIAN_LITTLE__ /* implementation-defined */#define __STDC_ENDIAN_BIG__    /* implementation-defined */#define __STDC_ENDIAN_NATIVE__ /* implementation-defined */ unsignedint stdc_leading_zeros_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_leading_zeros_us(unsignedshort value)[[unsequenced]];unsignedint stdc_leading_zeros_ui(unsignedint value)[[unsequenced]];unsignedint stdc_leading_zeros_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_leading_zeros_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_leading_zeros(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_leading_ones_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_leading_ones_us(unsignedshort value)[[unsequenced]];unsignedint stdc_leading_ones_ui(unsignedint value)[[unsequenced]];unsignedint stdc_leading_ones_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_leading_ones_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_leading_ones(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_trailing_zeros_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_trailing_zeros_us(unsignedshort value)[[unsequenced]];unsignedint stdc_trailing_zeros_ui(unsignedint value)[[unsequenced]];unsignedint stdc_trailing_zeros_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_trailing_zeros_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_trailing_zeros(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_trailing_ones_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_trailing_ones_us(unsignedshort value)[[unsequenced]];unsignedint stdc_trailing_ones_ui(unsignedint value)[[unsequenced]];unsignedint stdc_trailing_ones_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_trailing_ones_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_trailing_ones(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_first_leading_zero_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_first_leading_zero_us(unsignedshort value)[[unsequenced]];unsignedint stdc_first_leading_zero_ui(unsignedint value)[[unsequenced]];unsignedint stdc_first_leading_zero_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_first_leading_zero_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_first_leading_zero(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_first_leading_one_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_first_leading_one_us(unsignedshort value)[[unsequenced]];unsignedint stdc_first_leading_one_ui(unsignedint value)[[unsequenced]];unsignedint stdc_first_leading_one_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_first_leading_one_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_first_leading_one(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_first_trailing_zero_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_first_trailing_zero_us(unsignedshort value)[[unsequenced]];unsignedint stdc_first_trailing_zero_ui(unsignedint value)[[unsequenced]];unsignedint stdc_first_trailing_zero_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_first_trailing_zero_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_first_trailing_zero(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_first_trailing_one_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_first_trailing_one_us(unsignedshort value)[[unsequenced]];unsignedint stdc_first_trailing_one_ui(unsignedint value)[[unsequenced]];unsignedint stdc_first_trailing_one_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_first_trailing_one_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_first_trailing_one(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_count_zeros_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_count_zeros_us(unsignedshort value)[[unsequenced]];unsignedint stdc_count_zeros_ui(unsignedint value)[[unsequenced]];unsignedint stdc_count_zeros_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_count_zeros_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_count_zeros(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_count_ones_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_count_ones_us(unsignedshort value)[[unsequenced]];unsignedint stdc_count_ones_ui(unsignedint value)[[unsequenced]];unsignedint stdc_count_ones_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_count_ones_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_count_ones(/*generic_value_type*/ value)[[unsequenced]];bool stdc_has_single_bit_uc(unsignedchar value)[[unsequenced]];bool stdc_has_single_bit_us(unsignedshort value)[[unsequenced]];bool stdc_has_single_bit_ui(unsignedint value)[[unsequenced]];bool stdc_has_single_bit_ul(unsignedlongint value)[[unsequenced]];bool stdc_has_single_bit_ull(unsignedlonglongint value)[[unsequenced]];bool stdc_has_single_bit(/*generic_value_type*/ value)[[unsequenced]];unsignedint stdc_bit_width_uc(unsignedchar value)[[unsequenced]];unsignedint stdc_bit_width_us(unsignedshort value)[[unsequenced]];unsignedint stdc_bit_width_ui(unsignedint value)[[unsequenced]];unsignedint stdc_bit_width_ul(unsignedlongint value)[[unsequenced]];unsignedint stdc_bit_width_ull(unsignedlonglongint value)[[unsequenced]];/*generic_return_type*/stdc_bit_width(/*generic_value_type*/ value)[[unsequenced]];unsignedchar stdc_bit_floor_uc(unsignedchar value)[[unsequenced]];unsignedshort stdc_bit_floor_us(unsignedshort value)[[unsequenced]];unsignedint stdc_bit_floor_ui(unsignedint value)[[unsequenced]];unsignedlongint stdc_bit_floor_ul(unsignedlongint value)[[unsequenced]];unsignedlonglongint stdc_bit_floor_ull(unsignedlonglongint value)[[unsequenced]];/*generic_value_type*/stdc_bit_floor(/*generic_value_type*/ value)[[unsequenced]];unsignedchar stdc_bit_ceil_uc(unsignedchar value)[[unsequenced]];unsignedshort stdc_bit_ceil_us(unsignedshort value)[[unsequenced]];unsignedint stdc_bit_ceil_ui(unsignedint value)[[unsequenced]];unsignedlongint stdc_bit_ceil_ul(unsignedlongint value)[[unsequenced]];unsignedlonglongint stdc_bit_ceil_ull(unsignedlonglongint value)[[unsequenced]];/*generic_value_type*/stdc_bit_ceil(/*generic_value_type*/ value)[[unsequenced]];unsignedchar stdc_rotate_left_uc(unsignedchar value,unsignedint count);unsignedshort stdc_rotate_left_us(unsignedshort value,unsignedint count);unsignedint stdc_rotate_left_ui(unsignedint value,unsignedint count);unsignedlong stdc_rotate_left_ul(unsignedlong value,unsignedint count);unsignedlonglong stdc_rotate_left_ull(unsignedlonglong value,unsignedint count);/*generic_value_type*/stdc_rotate_left(/*generic_value_type*/ value, generic_count_type count);unsignedchar stdc_rotate_right_uc(unsignedchar value,unsignedint count);unsignedshort stdc_rotate_right_us(unsignedshort value,unsignedint count);unsignedint stdc_rotate_right_ui(unsignedint value,unsignedint count);unsignedlong stdc_rotate_right_ul(unsignedlong value,unsignedint count);unsignedlonglong stdc_rotate_right_ull(unsignedlonglong value,unsignedint count);/*generic_value_type*/stdc_rotate_right(/*generic_value_type*/ value, generic_count_type count);
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/header/stdbit&oldid=180174"

      [8]ページ先頭

      ©2009-2025 Movatter.jp