diff --git a/include/hibf/contrib/README.md b/include/hibf/contrib/README.md new file mode 100644 index 00000000..27373031 --- /dev/null +++ b/include/hibf/contrib/README.md @@ -0,0 +1,13 @@ +The `std` directory is a git subtree and includes the content of https://github.com/seqan/seqan-std. + +For a general overview regarding `git subtree`, see, for example, https://www.atlassian.com/git/tutorials/git-subtree. + +Pulling upstream changes can be achieved by +``` +git subtree pull --prefix include/hibf/contrib/std https://github.com/seqan/seqan-std.git main --squash +``` + +Similarly, you can push subtree changes to your fork: +``` +git subtree push --prefix include/hibf/contrib/std https://github.com//seqan-std.git +``` diff --git a/include/hibf/contrib/std/chunk_view.hpp b/include/hibf/contrib/std/chunk_view.hpp index cd3c2487..acff4240 100644 --- a/include/hibf/contrib/std/chunk_view.hpp +++ b/include/hibf/contrib/std/chunk_view.hpp @@ -173,7 +173,7 @@ class chunk_view::outer_iterator return *x.parent_->current_ == std::ranges::end(x.parent_->base_) && x.parent_->remainder_ != 0; } - friend constexpr difference_type operator-(std::default_sentinel_t y, outer_iterator const & x) + friend constexpr difference_type operator-(std::default_sentinel_t, outer_iterator const & x) requires std::sized_sentinel_for, std::ranges::iterator_t> { auto const dist = std::ranges::end(x.parent_->base_) - *x.parent_->current_; @@ -270,7 +270,7 @@ class chunk_view::inner_iterator return x.parent_->remainder_ == 0; } - friend constexpr difference_type operator-(std::default_sentinel_t y, inner_iterator const & x) + friend constexpr difference_type operator-(std::default_sentinel_t, inner_iterator const & x) requires std::sized_sentinel_for, std::ranges::iterator_t> { std::ranges::min(x.parent_->remainder_, std::ranges::end(x.parent_->base_) - *x.parent_->current_); @@ -572,7 +572,7 @@ class chunk_view::iterator return (x.current_ - y.current_ + x.missing_ - y.missing_) / x.n_; } - friend constexpr difference_type operator-(std::default_sentinel_t y, iterator const & x) + friend constexpr difference_type operator-(std::default_sentinel_t, iterator const & x) requires std::sized_sentinel_for, std::ranges::iterator_t> { return seqan::stl::detail::chunk::div_ceil(x.end_ - x.current_, x.n_); diff --git a/include/hibf/contrib/std/join_with_view.hpp b/include/hibf/contrib/std/join_with_view.hpp index 0b09c9f1..d83b5b15 100644 --- a/include/hibf/contrib/std/join_with_view.hpp +++ b/include/hibf/contrib/std/join_with_view.hpp @@ -88,10 +88,10 @@ class join_with_view : Pattern pattern_{}; template - struct iterator; + class iterator; template - struct sentinel; + class sentinel; public: join_with_view() diff --git a/include/hibf/contrib/std/zip_view.hpp b/include/hibf/contrib/std/zip_view.hpp index ef168cc2..653014eb 100644 --- a/include/hibf/contrib/std/zip_view.hpp +++ b/include/hibf/contrib/std/zip_view.hpp @@ -16,7 +16,8 @@ #include -#ifdef __cpp_lib_ranges_zip +// https://godbolt.org/z/YW7e785sd +#if defined __cpp_lib_ranges_zip && !defined(__clang__) namespace seqan::stl::views {