From c468426dea155e33041272267f500bb5449d6277 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 20 Apr 2021 13:16:48 +0200 Subject: [PATCH] [FIX] gcc-11: std::views::drop expects std::ranges::range_difference_t (#2528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FIX] gcc-11: std::views::drop expects std::ranges::range_difference_t ``` seqan3/include/seqan3/range/views/drop.hpp:95:49: error: no match for ‘operator|’ (operand types are ‘std::ranges::ref_view >’ and ‘std::ranges::views::__adaptor::_Partial’) 95 | return std::forward(urange) | std::views::drop(drop_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` * Apply suggestions from code review --- include/seqan3/range/views/drop.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/seqan3/range/views/drop.hpp b/include/seqan3/range/views/drop.hpp index 87b5fb891c..d1680ca948 100644 --- a/include/seqan3/range/views/drop.hpp +++ b/include/seqan3/range/views/drop.hpp @@ -92,7 +92,9 @@ struct drop_fn // std::views::drop else { - return std::forward(urange) | std::views::drop(drop_size); + using drop_size_t = std::ranges::range_difference_t; + // urange | std::views::drop(drop_size); + return std::views::drop(std::forward(urange), static_cast(drop_size)); } } };