Skip to content

Commit a30b4f2

Browse files
committed
Fix std::size_t
1 parent 9849b8b commit a30b4f2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

include/xsimd/types/xsimd_batch_constant.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#ifndef XSIMD_BATCH_CONSTANT_HPP
1313
#define XSIMD_BATCH_CONSTANT_HPP
1414

15+
#include <cstddef>
16+
1517
#include "./xsimd_batch.hpp"
1618
#include "./xsimd_utils.hpp"
1719

@@ -45,7 +47,7 @@ namespace xsimd
4547
*/
4648
constexpr operator batch_type() const noexcept { return as_batch_bool(); }
4749

48-
constexpr bool get(size_t i) const noexcept
50+
constexpr bool get(std::size_t i) const noexcept
4951
{
5052
return std::array<value_type, size> { { Values... } }[i];
5153
}
@@ -77,7 +79,7 @@ namespace xsimd
7779
constexpr bool operator()(bool x, bool y) const { return x ^ y; }
7880
};
7981

80-
template <class F, class SelfPack, class OtherPack, size_t... Indices>
82+
template <class F, class SelfPack, class OtherPack, std::size_t... Indices>
8183
static constexpr batch_bool_constant<T, A, F()(std::tuple_element<Indices, SelfPack>::type::value, std::tuple_element<Indices, OtherPack>::type::value)...>
8284
apply(detail::index_sequence<Indices...>)
8385
{
@@ -149,13 +151,13 @@ namespace xsimd
149151
/**
150152
* @brief Get the @p i th element of this @p batch_constant
151153
*/
152-
constexpr T get(size_t i) const noexcept
154+
constexpr T get(std::size_t i) const noexcept
153155
{
154156
return get(i, std::array<T, size> { Values... });
155157
}
156158

157159
private:
158-
constexpr T get(size_t i, std::array<T, size> const& values) const noexcept
160+
constexpr T get(std::size_t i, std::array<T, size> const& values) const noexcept
159161
{
160162
return values[i];
161163
}
@@ -193,7 +195,7 @@ namespace xsimd
193195
constexpr T operator()(T x, T y) const { return x ^ y; }
194196
};
195197

196-
template <class F, class SelfPack, class OtherPack, size_t... Indices>
198+
template <class F, class SelfPack, class OtherPack, std::size_t... Indices>
197199
static constexpr batch_constant<T, A, F()(std::tuple_element<Indices, SelfPack>::type::value, std::tuple_element<Indices, OtherPack>::type::value)...>
198200
apply(detail::index_sequence<Indices...>)
199201
{
@@ -253,7 +255,7 @@ namespace xsimd
253255
constexpr bool operator()(T x, T y) const { return x <= y; }
254256
};
255257

256-
template <class F, class SelfPack, class OtherPack, size_t... Indices>
258+
template <class F, class SelfPack, class OtherPack, std::size_t... Indices>
257259
static constexpr batch_bool_constant<T, A, F()(std::tuple_element<Indices, SelfPack>::type::value, std::tuple_element<Indices, OtherPack>::type::value)...>
258260
apply_bool(detail::index_sequence<Indices...>)
259261
{

0 commit comments

Comments
 (0)