aboutsummaryrefslogtreecommitdiff
path: root/libcxx/modules/std/bit.inc
blob: 027a6c17ad6a6b0cde7f72d289086fe9ed4d488c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

export namespace std {
  // [bit.cast], bit_cast
  using std::bit_cast;

#if _LIBCPP_STD_VER >= 23
  // [bit.byteswap], byteswap
  using std::byteswap;
#endif

  // [bit.pow.two], integral powers of 2
  using std::bit_ceil;
  using std::bit_floor;
  using std::bit_width;
  using std::has_single_bit;

  // [bit.rotate], rotating
  using std::rotl;
  using std::rotr;

  // [bit.count], counting
  using std::countl_one;
  using std::countl_zero;
  using std::countr_one;
  using std::countr_zero;
  using std::popcount;

  // [bit.endian], endian
  using std::endian;
} // namespace std