Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/seqan3/contrib/sdsl-lite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// * All comments were removed.
// * "SDSL_" was replaced with "SDSL3_". This affects macros and include guards.
// * The namespace was changed from "sdsl" to "seqan3::contrib::sdsl".
// * "std::is_trivial" was replaced with "is_trivially_default_constructible && is_trivially_copyable".

#pragma once

Expand Down Expand Up @@ -3170,7 +3171,7 @@ serialize(X const & x, std::ostream & out, structure_tree_node * v = nullptr, st
return x.serialize(out, v, name);
}
template <typename X>
typename std::enable_if<std::is_standard_layout<X>::value && std::is_trivial<X>::value, uint64_t>::type
typename std::enable_if<std::is_standard_layout<X>::value && std::is_trivially_default_constructible<X>::value && std::is_trivially_copyable<X>::value, uint64_t>::type
serialize(X const & x, std::ostream & out, structure_tree_node * v = nullptr, std::string name = "")
{
return write_member(x, out, v, name);
Expand All @@ -3187,7 +3188,7 @@ typename std::enable_if<has_load<X>::value, void>::type load(X & x, std::istream
x.load(in);
}
template <typename X>
typename std::enable_if<std::is_standard_layout<X>::value && std::is_trivial<X>::value, void>::type
typename std::enable_if<std::is_standard_layout<X>::value && std::is_trivially_default_constructible<X>::value && std::is_trivially_copyable<X>::value, void>::type
load(X & x, std::istream & in)
{
read_member(x, in);
Expand Down
5 changes: 5 additions & 0 deletions test/scripts/amalgamate-sdsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ CONTENT=${CONTENT//SDSL_/SDSL3_}
CONTENT=${CONTENT//namespace sdsl/namespace seqan3::contrib::sdsl}
CONTENT=${CONTENT//sdsl::/seqan3::contrib::sdsl::}

## Patches
# [C++26] `std::is_trivial` is deprecated: use `is_trivially_default_constructible && is_trivially_copyable` instead
CONTENT=${CONTENT//std::is_trivial<X>::value/std::is_trivially_default_constructible<X>::value \&\& std::is_trivially_copyable<X>::value}

cat <<EOL > sdsl-lite.hpp
// SPDX-FileCopyrightText: 2016 SDSL Project Authors
// SPDX-License-Identifier: BSD-3-Clause
Expand All @@ -63,6 +67,7 @@ cat <<EOL > sdsl-lite.hpp
// * All comments were removed.
// * "SDSL_" was replaced with "SDSL3_". This affects macros and include guards.
// * The namespace was changed from "sdsl" to "seqan3::contrib::sdsl".
// * "std::is_trivial" was replaced with "is_trivially_default_constructible && is_trivially_copyable".

#pragma once

Expand Down
Loading