Path: blob/main/contrib/llvm-project/libcxx/include/__cxx03/__bit/blsr.h
213799 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef _LIBCPP___CXX03___BIT_BLSR_H9#define _LIBCPP___CXX03___BIT_BLSR_H1011#include <__cxx03/__config>1213#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)14# pragma GCC system_header15#endif1617_LIBCPP_BEGIN_NAMESPACE_STD1819inline _LIBCPP_HIDE_FROM_ABI unsigned __libcpp_blsr(unsigned __x) _NOEXCEPT { return __x ^ (__x & -__x); }2021inline _LIBCPP_HIDE_FROM_ABI unsigned long __libcpp_blsr(unsigned long __x) _NOEXCEPT { return __x ^ (__x & -__x); }2223inline _LIBCPP_HIDE_FROM_ABI unsigned long long __libcpp_blsr(unsigned long long __x) _NOEXCEPT {24return __x ^ (__x & -__x);25}2627_LIBCPP_END_NAMESPACE_STD2829#endif // _LIBCPP___CXX03___BIT_BLSR_H303132