Warning, /include/c++/v1/__cxx03/bit is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===---------------------------------------------------------------------===//
0009
0010 #ifndef _LIBCPP___CXX03_BIT
0011 #define _LIBCPP___CXX03_BIT
0012
0013 /*
0014 bit synopsis
0015
0016 namespace std {
0017 // [bit.cast], bit_cast
0018 template<class To, class From>
0019 constexpr To bit_cast(const From& from) noexcept; // C++20
0020
0021 // [bit.byteswap], byteswap
0022 template<class T>
0023 constexpr T byteswap(T value) noexcept; // C++23
0024
0025 // [bit.pow.two], integral powers of 2
0026 template <class T>
0027 constexpr bool has_single_bit(T x) noexcept; // C++20
0028 template <class T>
0029 constexpr T bit_ceil(T x); // C++20
0030 template <class T>
0031 constexpr T bit_floor(T x) noexcept; // C++20
0032 template <class T>
0033 constexpr int bit_width(T x) noexcept; // C++20
0034
0035 // [bit.rotate], rotating
0036 template<class T>
0037 constexpr T rotl(T x, int s) noexcept; // C++20
0038 template<class T>
0039 constexpr T rotr(T x, int s) noexcept; // C++20
0040
0041 // [bit.count], counting
0042 template<class T>
0043 constexpr int countl_zero(T x) noexcept; // C++20
0044 template<class T>
0045 constexpr int countl_one(T x) noexcept; // C++20
0046 template<class T>
0047 constexpr int countr_zero(T x) noexcept; // C++20
0048 template<class T>
0049 constexpr int countr_one(T x) noexcept; // C++20
0050 template<class T>
0051 constexpr int popcount(T x) noexcept; // C++20
0052
0053 // [bit.endian], endian
0054 enum class endian {
0055 little = see below, // C++20
0056 big = see below, // C++20
0057 native = see below // C++20
0058 };
0059
0060 } // namespace std
0061
0062 */
0063
0064 #include <__cxx03/__config>
0065
0066 #if _LIBCPP_STD_VER >= 20
0067 # include <__cxx03/__bit/bit_cast.h>
0068 # include <__cxx03/__bit/bit_ceil.h>
0069 # include <__cxx03/__bit/bit_floor.h>
0070 # include <__cxx03/__bit/bit_log2.h>
0071 # include <__cxx03/__bit/bit_width.h>
0072 # include <__cxx03/__bit/countl.h>
0073 # include <__cxx03/__bit/countr.h>
0074 # include <__cxx03/__bit/endian.h>
0075 # include <__cxx03/__bit/has_single_bit.h>
0076 # include <__cxx03/__bit/popcount.h>
0077 # include <__cxx03/__bit/rotate.h>
0078 #endif
0079
0080 #if _LIBCPP_STD_VER >= 23
0081 # include <__cxx03/__bit/byteswap.h>
0082 #endif
0083
0084 #include <__cxx03/version>
0085
0086 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0087 # pragma GCC system_header
0088 #endif
0089
0090 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
0091 # include <__cxx03/cstdint>
0092 #endif
0093
0094 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
0095 # include <__cxx03/cstdlib>
0096 # include <__cxx03/iosfwd>
0097 # include <__cxx03/limits>
0098 # include <__cxx03/type_traits>
0099 #endif
0100
0101 #endif // _LIBCPP___CXX03_BIT