chromium/third_party/libc++/src/include/__random/log2.h

//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANDOM_LOG2_H
#define _LIBCPP___RANDOM_LOG2_H

#include <__config>
#include <__type_traits/conditional.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _UIntType, _UIntType _Xp, size_t _Rp>
struct __log2_imp;

__log2_imp<unsigned long long, _Xp, _Rp>;

__log2_imp<unsigned long long, _Xp, 0>;

__log2_imp<unsigned long long, 0, _Rp>;

#ifndef _LIBCPP_HAS_NO_INT128

__log2_imp<__uint128_t, _Xp, _Rp>;

#endif // _LIBCPP_HAS_NO_INT128

template <class _UIntType, _UIntType _Xp>
struct __log2 {};

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___RANDOM_LOG2_H