mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/fix-ranges-debian-11-build-failure'
* origin/topic/timw/fix-ranges-debian-11-build-failure: Fix build failure with std::ranges on Debian 11
This commit is contained in:
commit
06ec03046d
3 changed files with 13 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
|||
8.0.0-dev.790 | 2025-07-29 07:18:39 -0700
|
||||
|
||||
* Fix build failure with std::ranges on Debian 11 (Tim Wojtulewicz, Corelight)
|
||||
|
||||
8.0.0-dev.788 | 2025-07-29 11:29:11 +0200
|
||||
|
||||
* cluster.bif: Improve Cluster::publish() docstring (Arne Welzel, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
8.0.0-dev.788
|
||||
8.0.0-dev.790
|
||||
|
|
|
@ -1538,7 +1538,14 @@ TEST_CASE("util strstrip") {
|
|||
std::string strstrip(std::string s) {
|
||||
auto notspace = [](unsigned char c) { return ! std::isspace(c); };
|
||||
s.erase(s.begin(), std::ranges::find_if(s, notspace));
|
||||
s.erase(std::ranges::find_if(std::ranges::reverse_view(s), notspace).base(), s.end());
|
||||
|
||||
// We require `std::reverse_iterator::base` here which in e.g., gcc-10.2.1
|
||||
// is not implemented for the range equivalent of the code
|
||||
// (`borrowed_iterator_t` over a `reverse_view`). Stick to the non-ranges
|
||||
// version for now.
|
||||
// NOLINTNEXTLINE(modernize-use-ranges)
|
||||
s.erase(std::find_if(s.rbegin(), s.rend(), notspace).base(), s.end());
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue