diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-09-15 15:26:26 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-09-15 15:26:26 -0400 |
commit | fd5a858eb5ef93c4ac7b0399b67d46805d2dabec (patch) | |
tree | 98b5d4dcf8e1925e1706ac7b6a220136b6c11c09 /libstdc++-v3/doc | |
parent | b09193fb0686b70ca26b7fa87f9d258503d63837 (diff) | |
download | gcc-fd5a858eb5ef93c4ac7b0399b67d46805d2dabec.zip gcc-fd5a858eb5ef93c4ac7b0399b67d46805d2dabec.tar.gz gcc-fd5a858eb5ef93c4ac7b0399b67d46805d2dabec.tar.bz2 |
libstdc++: Use C++20 constraints in <bit>
Using a type-constraint instead of enable_if_t in the return types of
these functions greatly reduces the size of their mangled names. And by
now it's probably safe to assume recent compilers have sufficient C++20
concepts support to handle such constraints.
libstdc++-v3/ChangeLog:
* include/std/bit: Include <concepts>.
(byteswap): Use a type-constraint instead of enable_if_t
inside the return type, and use std::integral.
(_If_is_unsigned_integer): Replace with ...
(__unsigned_integer): ... this.
(rotl): Use a type-constraint instead of enable_if_t inside
the return type.
(countl_zero): Likewise.
(countl_one): Likewise.
(countr_zero): Likewise.
(countr_one): Likewise.
(popcount): Likewise.
(has_single_bit): Likewise.
(bit_ceil): Likewise.
(bit_floor): Likewise.
(bit_width): Likewise.
Diffstat (limited to 'libstdc++-v3/doc')
0 files changed, 0 insertions, 0 deletions