seqan / product_backlog

This repository is used as product backlog for all SeqAn relevant backlog items. This is intended to organise the work for the team.
2 stars 1 forks source link

api stability: gcc10 does not work #372

Closed marehr closed 3 years ago

marehr commented 3 years ago

Description

#include <seqan3/range/views/single_pass_input.hpp>
#include <seqan3/range/views/slice.hpp>
#include <seqan3/range/views/to.hpp>

int main()
{
    std::string vec;
    seqan3::detail::single_pass_input_view v1{vec};
    auto v2 = std::views::take(v1, 1);
    std::string v3 = seqan3::views::to<std::string>(v2);
}

does not compile on gcc-10:

/seqan3/submodules/range-v3/include/range/v3/iterator/concepts.hpp:138:5:   required for the satisfaction of ‘readable__concept_<typename std::remove_cv<meta::_t<std::remove_reference<_Tp> > >::type>’ [with _Tp = std::counted_iterator<seqan3::detail::basic_iterator<seqan3::detail::single_pass_input_view<std::ranges::ref_view<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >]
ice.cpp:64:27: error: no type named ‘value_type’ in ‘struct ranges::indirectly_readable_traits<std::counted_iterator<seqan3::detail::basic_iterator<seqan3::detail::single_pass_input_view<std::ranges::ref_view<std::__cxx11::basic_string<char> > > > > >’
ice.cpp:67:55: error: no matching function for call to ‘to<std::string>(std::ranges::take_view<seqan3::detail::single_pass_input_view<std::ranges::ref_view<std::__cxx11::basic_string<char> > > >&)’
   67 |     std::string v3 = seqan3::views::to<std::string>(v2);
      |                                                       ^

after a lot of reducing, it turned out we need to always compile with #define RANGES_DEEP_STL_INTEGRATION 1.