Skip to content

Commit 873a5f4

Browse files
authored
Merge pull request #3319 from eseiler/fix/cpp26_deprecation
[FIX] cpp26: std::is_trivial_v is deprecated
2 parents 4f0c4fd + d751f83 commit 873a5f4

9 files changed

Lines changed: 10 additions & 10 deletions

File tree

include/seqan3/utility/concept.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ concept trivially_copyable = std::copyable<t> && std::is_trivially_copyable_v<t>
134134
*/
135135
//!\cond
136136
template <typename t>
137-
concept trivial = trivially_copyable<t> && trivially_destructible<t> && std::is_trivial_v<t>;
137+
concept trivial = trivially_copyable<t> && trivially_destructible<t> && std::is_trivially_default_constructible_v<t>;
138138
//!\endcond
139139

140140
/*!\interface seqan3::standard_layout

include/seqan3/utility/tuple/pod_tuple.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <tuple>
1313
#include <type_traits>
1414

15+
#include <seqan3/utility/concept.hpp>
1516
#include <seqan3/utility/type_pack/traits.hpp>
1617

1718
namespace seqan3
@@ -46,7 +47,7 @@ struct pod_tuple
4647
template <typename type0, typename... types>
4748
struct pod_tuple<type0, types...>
4849
{
49-
static_assert(std::is_standard_layout_v<type0> && std::is_trivial_v<type0>, SEQAN_NOT_POD);
50+
static_assert(std::is_standard_layout_v<type0> && seqan3::trivial<type0>, SEQAN_NOT_POD);
5051
//!\cond DEV
5152
//!\brief The first element as member.
5253
type0 _head;
@@ -114,7 +115,7 @@ struct pod_tuple<type0, types...>
114115
template <typename type0>
115116
struct pod_tuple<type0>
116117
{
117-
static_assert(std::is_standard_layout_v<type0> && std::is_trivial_v<type0>, SEQAN_NOT_POD);
118+
static_assert(std::is_standard_layout_v<type0> && seqan3::trivial<type0>, SEQAN_NOT_POD);
118119
//!\cond DEV
119120
//!\brief The first element as member.
120121
type0 _head;

test/snippet/utility/tuple/pod_tuple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int main()
99
{
1010
seqan3::pod_tuple<int, float> tuple1{3, 4.7};
1111
static_assert(std::is_standard_layout_v<seqan3::pod_tuple<int, float>>);
12-
static_assert(std::is_trivial_v<seqan3::pod_tuple<int, float>>);
12+
static_assert(seqan3::trivial<seqan3::pod_tuple<int, float>>);
1313
seqan3::debug_stream << std::get<int>(tuple1) << '\n'; // 3
1414

1515
// template parameters are automatically deduced:

test/unit/alphabet/adaptation/char_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TYPED_TEST(char_adaptation, type_properties)
2929
{
3030
EXPECT_TRUE((std::is_trivially_copyable_v<TypeParam>));
3131
EXPECT_TRUE((std::is_trivially_default_constructible_v<TypeParam>));
32-
EXPECT_TRUE((std::is_trivial_v<TypeParam>));
32+
EXPECT_TRUE((seqan3::trivial<TypeParam>));
3333
}
3434

3535
TYPED_TEST(char_adaptation, alphabet_char_t)

test/unit/alphabet/adaptation/uint_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ TYPED_TEST(uint_adaptation, type_properties)
3232
{
3333
EXPECT_TRUE((std::is_trivially_copyable_v<TypeParam>));
3434
EXPECT_TRUE((std::is_trivially_default_constructible_v<TypeParam>));
35-
EXPECT_TRUE((std::is_trivial_v<TypeParam>));
35+
EXPECT_TRUE((seqan3::trivial<TypeParam>));
3636
}
3737

3838
TYPED_TEST(uint_adaptation, alphabet_rank_t)

test/unit/alphabet/aminoacid/aminoacid_test_template.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ TYPED_TEST_SUITE_P(aminoacid);
1717

1818
TYPED_TEST_P(aminoacid, concept_check)
1919
{
20-
EXPECT_TRUE(std::is_trivial_v<TypeParam>);
20+
EXPECT_TRUE(seqan3::trivial<TypeParam>);
2121

2222
EXPECT_TRUE(seqan3::aminoacid_alphabet<TypeParam>);
2323
EXPECT_TRUE(seqan3::aminoacid_alphabet<TypeParam &>);

test/unit/alphabet/nucleotide/nucleotide_test_template.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TYPED_TEST_SUITE_P(nucleotide);
1616

1717
TYPED_TEST_P(nucleotide, concept_check)
1818
{
19-
EXPECT_TRUE(std::is_trivial_v<TypeParam>);
19+
EXPECT_TRUE(seqan3::trivial<TypeParam>);
2020

2121
EXPECT_TRUE(seqan3::nucleotide_alphabet<TypeParam>);
2222
EXPECT_TRUE(seqan3::nucleotide_alphabet<TypeParam &>);

test/unit/alphabet/quality/phred_test_template.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ TYPED_TEST_SUITE_P(phred);
1414
// test provision of data type `phred_type` and phred converter.
1515
TYPED_TEST_P(phred, concept_check)
1616
{
17-
EXPECT_TRUE(std::is_trivial_v<TypeParam>);
17+
EXPECT_TRUE(seqan3::trivial<TypeParam>);
1818

1919
EXPECT_TRUE(seqan3::quality_alphabet<TypeParam>);
2020
EXPECT_TRUE(seqan3::quality_alphabet<TypeParam &>);

test/unit/utility/tuple/pod_tuple_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#include <type_traits>
88

9-
#include <seqan3/utility/concept.hpp>
109
#include <seqan3/utility/tuple/pod_tuple.hpp>
1110

1211
using tuple_t = seqan3::pod_tuple<int, long, float>;

0 commit comments

Comments
 (0)