xref: /aosp_15_r20/external/cronet/third_party/libc++/src/modules/std/bit.cppm (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10module;
11#include <bit>
12
13export module std:bit;
14export namespace std {
15  // [bit.cast], bit_cast
16  using std::bit_cast;
17
18  // [bit.byteswap], byteswap
19  using std::byteswap;
20
21  // [bit.pow.two], integral powers of 2
22  using std::bit_ceil;
23  using std::bit_floor;
24  using std::bit_width;
25  using std::has_single_bit;
26
27  // [bit.rotate], rotating
28  using std::rotl;
29  using std::rotr;
30
31  // [bit.count], counting
32  using std::countl_one;
33  using std::countl_zero;
34  using std::countr_one;
35  using std::countr_zero;
36  using std::popcount;
37
38  // [bit.endian], endian
39  using std::endian;
40} // namespace std
41