Nico Della Torre pushed to branch master at Debian Med / pbseqlib
Commits: 2de3029e by Nico Della Torre at 2026-11-20T18:50:58+01:00 Compare only the k-mer in TupleList::Find/FindAll under C++20 - - - - - 046824dc by Nico Della Torre at 2026-11-20T18:51:01+01:00 Update changelog - - - - - 869d5eae by Nico Della Torre at 2026-11-20T21:47:52+01:00 Merge branch 'fix-tuplelist-cxx20' into 'master' fix TupleList::Find/FindAll under C++20 See merge request med-team/pbseqlib!2 - - - - - 3 changed files: - debian/changelog - debian/patches/series - + debian/patches/tuplelist-cxx20-comparison.patch Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,13 @@ +pbseqlib (5.3.5+dfsg-15) UNRELEASED; urgency=medium + + * Team upload. + * d/patches: Compare only the k-mer in TupleList::Find/FindAll; under + C++20 the rewritten operator== also compared the position, so code + built with -std=c++20 against these headers (pbdagcon) found far + fewer matches + + -- Nico Della Torre <[email protected]> Fri, 20 Nov 2026 18:50:58 +0100 + pbseqlib (5.3.5+dfsg-14) unstable; urgency=medium * Team upload. ===================================== debian/patches/series ===================================== @@ -8,3 +8,4 @@ gcc-14.patch gcc-16.patch pbseqlib-findmaxinterval-size1-oob.patch globalchain-empty-interval-oob.patch +tuplelist-cxx20-comparison.patch ===================================== debian/patches/tuplelist-cxx20-comparison.patch ===================================== @@ -0,0 +1,30 @@ +Description: Compare only the k-mer in TupleList::Find/FindAll + With T = PositionDNATuple, "*it != tuple" picks operator!=(const DNATuple &), + which compares only the k-mer. Under C++20 the rewritten !(a == b) using + operator==(const PositionDNATuple &) is an exact match and wins, and it + also compares pos, so FindAll() stops after the first hit. Code built + with -std=c++20 against these headers (e.g. pbdagcon) then finds far + fewer matches. Compare the k-mer explicitly, as C++17 did. +Author: Nico Della Torre <[email protected]> +Forwarded: not-needed +Last-Update: 2026-11-20 +--- a/alignment/tuples/TupleListImpl.hpp ++++ b/alignment/tuples/TupleListImpl.hpp +@@ -85,7 +85,7 @@ int TupleList<T>::Find(T &tuple) + begin = tupleList.begin(); + end = tupleList.end(); + matchIt = lower_bound(begin, end, tuple); +- if (*matchIt != tuple) { ++ if (matchIt->tuple != tuple.tuple) { + return -1; + } else { + return matchIt - tupleList.begin(); +@@ -104,7 +104,7 @@ void TupleList<T>::FindAll(T &tuple, typ + endPos = tupleList.end(); + endPos = upper_bound(firstPos, endPos, tuple); + while (endPos != tupleList.end()) { +- if (*endPos != tuple) { ++ if (endPos->tuple != tuple.tuple) { + return; + } else { + endPos++; View it on GitLab: https://salsa.debian.org/med-team/pbseqlib/-/compare/6fbaabf7664ce33329efca296d99dd26a5c507cf...869d5eae07a10fb53649bf55db9937329476ea41 -- View it on GitLab: https://salsa.debian.org/med-team/pbseqlib/-/compare/6fbaabf7664ce33329efca296d99dd26a5c507cf...869d5eae07a10fb53649bf55db9937329476ea41 You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
