Skip to content

Commit 600f969

Browse files
committed
Stop using std::is_trivial (deprecated in C++26)
1 parent 6854704 commit 600f969

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/cpp-sort/detail/move.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2022 Morwenn
2+
* Copyright (c) 2019-2025 Morwenn
33
* SPDX-License-Identifier: MIT
44
*/
55
#ifndef CPPSORT_DETAIL_MOVE_H_
@@ -102,8 +102,9 @@ namespace detail
102102
-> T*
103103
{
104104
using truth_type = std::integral_constant<bool,
105-
std::is_trivial<value_type_t<InputIterator>>::value &&
106-
std::is_trivial<T>::value
105+
std::is_trivially_copyable<value_type_t<InputIterator>>::value &&
106+
std::is_trivially_copyable<T>::value &&
107+
sizeof(T) == sizeof(value_type_t<InputIterator>)
107108
>;
108109
return uninitialized_move_impl(truth_type{}, std::move(first), std::move(last),
109110
std::move(result), destroyer);

0 commit comments

Comments
 (0)