Skip to content

Commit 7cf60c8

Browse files
authored
Backport cleanup (#1385)
* Removed backport of void_t * removed empty file build.rst * Removed outdated stuff
1 parent 9d48922 commit 7cf60c8

5 files changed

Lines changed: 10 additions & 51 deletions

File tree

‎docs/source/build.rst‎

Whitespace-only changes.

‎include/xsimd/arch/common/xsimd_common_details.hpp‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,11 @@ namespace xsimd
301301
using type = with_slow_conversion;
302302
};
303303

304-
using xsimd::detail::void_t;
305-
306304
template <class A, class From, class To>
307305
struct conversion_type_impl<A, From, To,
308-
void_t<decltype(fast_cast(std::declval<const batch<From, A>&>(),
309-
std::declval<const batch<To, A>&>(),
310-
std::declval<const A&>()))>>
306+
std::void_t<decltype(fast_cast(std::declval<const batch<From, A>&>(),
307+
std::declval<const batch<To, A>&>(),
308+
std::declval<const A&>()))>>
311309
{
312310
using type = with_fast_conversion;
313311
};

‎include/xsimd/memory/xsimd_alignment.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace xsimd
7474
};
7575

7676
template <class C>
77-
struct container_alignment<C, detail::void_t<typename C::allocator_type>>
77+
struct container_alignment<C, std::void_t<typename C::allocator_type>>
7878
{
7979
using type = allocator_alignment_t<typename C::allocator_type>;
8080
};

‎include/xsimd/types/xsimd_api.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ namespace xsimd
371371
template <class Arch, class Batch, class BatchConstant>
372372
struct has_bitwise_lshift_batch_const<
373373
Arch, Batch, BatchConstant,
374-
void_t<decltype(kernel::bitwise_lshift<Arch>(
374+
std::void_t<decltype(kernel::bitwise_lshift<Arch>(
375375
std::declval<Batch>(), std::declval<BatchConstant>(), Arch {}))>>
376376
: std::true_type
377377
{

‎include/xsimd/types/xsimd_utils.hpp‎

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,8 @@ namespace xsimd
190190
inline To bit_cast(From val) noexcept
191191
{
192192
static_assert(sizeof(From) == sizeof(To), "casting between compatible layout");
193-
// FIXME: Some old version of GCC don't support that trait
194-
// static_assert(std::is_trivially_copyable<From>::value, "input type is trivially copyable");
195-
// static_assert(std::is_trivially_copyable<To>::value, "output type is trivially copyable");
193+
static_assert(std::is_trivially_copyable<From>::value, "input type is trivially copyable");
194+
static_assert(std::is_trivially_copyable<To>::value, "output type is trivially copyable");
196195
To res;
197196
std::memcpy(&res, &val, sizeof(val));
198197
return res;
@@ -255,19 +254,13 @@ namespace xsimd
255254
} // namespace detail
256255
} // namespace kernel
257256

258-
/*****************************************
259-
* Backport of index_sequence from c++14 *
260-
*****************************************/
257+
/*******************************************
258+
* int_sequence and make_sequence_as_batch *
259+
*******************************************/
261260

262261
// TODO: Remove this once we drop C++11 support
263262
namespace detail
264263
{
265-
template <typename T>
266-
struct identity
267-
{
268-
using type = T;
269-
};
270-
271264
template <int... Is>
272265
using int_sequence = std::integer_sequence<int, Is...>;
273266

@@ -291,38 +284,6 @@ namespace xsimd
291284
}
292285
}
293286

294-
/*********************************
295-
* Backport of void_t from C++17 *
296-
*********************************/
297-
298-
namespace detail
299-
{
300-
template <class... T>
301-
struct make_void
302-
{
303-
using type = void;
304-
};
305-
306-
template <class... T>
307-
using void_t = typename make_void<T...>::type;
308-
}
309-
310-
/**************************************************
311-
* Equivalent of void_t but with size_t parameter *
312-
**************************************************/
313-
314-
namespace detail
315-
{
316-
template <std::size_t>
317-
struct check_size
318-
{
319-
using type = void;
320-
};
321-
322-
template <std::size_t S>
323-
using check_size_t = typename check_size<S>::type;
324-
}
325-
326287
/*****************************************
327288
* Supplementary std::array constructors *
328289
*****************************************/

0 commit comments

Comments
 (0)