Skip to content

Commit

Permalink
No BitScanForward for __clang__
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Jan 14, 2025
1 parent 36d9861 commit 13a037e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Number_types/include/CGAL/Mpzf.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

#include <boost/cstdint.hpp>

#ifdef _MSC_VER
#ifdef _MSC_VER && (! defined(__clang__))
#include <intrin.h>
#pragma intrinsic(_BitScanForward64)
#pragma intrinsic(_BitScanReverse64)
Expand Down Expand Up @@ -190,7 +190,7 @@ template <class T, class = void> struct no_pool {

// Only used with an argument known not to be 0.
inline int ctz (std::uint64_t x) {
#if defined(_MSC_VER)
#if defined(_MSC_VER) && (! defined(__clang__))
unsigned long ret;
_BitScanForward64(&ret, x);
return (int)ret;
Expand All @@ -202,7 +202,7 @@ inline int ctz (std::uint64_t x) {
#endif
}
inline int clz (std::uint64_t x) {
#if defined(_MSC_VER)
#if defined(_MSC_VER) && (! defined(__clang__))
unsigned long ret;
_BitScanReverse64(&ret, x);
return 63 - (int)ret;
Expand Down
4 changes: 2 additions & 2 deletions Number_types/include/CGAL/cpp_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace CGAL {
namespace internal {
// Only used with an argument known not to be 0.
inline int low_bit (boost::uint64_t x) {
#if defined(_MSC_VER)
#if defined(_MSC_VER) && (! defined(__clang__))
unsigned long ret;
_BitScanForward64(&ret, x);
return (int)ret;
Expand All @@ -37,7 +37,7 @@ namespace internal {
#endif
}
inline int high_bit (boost::uint64_t x) {
#if defined(_MSC_VER)
#if defined(_MSC_VER) && (! defined(__clang__))
unsigned long ret;
_BitScanReverse64(&ret, x);
return (int)ret;
Expand Down

0 comments on commit 13a037e

Please sign in to comment.