Skip to content

Commit fcd534f

Browse files
committed
Use <bit> if possible
1 parent 65f86c2 commit fcd534f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/xsimd/types/xsimd_bit.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@
55
#ifndef XSIMD_BIT_HPP
66
#define XSIMD_BIT_HPP
77

8+
#include <version>
9+
10+
#if __cpp_lib_bitops >= 201907L
11+
12+
#include <bit>
13+
14+
namespace xsimd
15+
{
16+
namespace detail
17+
{
18+
using std::countl_one;
19+
using std::countl_zero;
20+
using std::countr_one;
21+
using std::countr_zero;
22+
using std::popcount;
23+
}
24+
}
25+
26+
#else
27+
828
#include <climits>
929
#include <type_traits>
1030

@@ -203,3 +223,4 @@ namespace xsimd
203223
}
204224

205225
#endif
226+
#endif

0 commit comments

Comments
 (0)