Advertisement
Guest User

Untitled

a guest
May 20th, 2022
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.34 KB | None | 0 0
  1. In file included from test.cc:1:
  2. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/iostream:39:
  3. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ostream:38:
  4. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ios:40:
  5. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/char_traits.h:39:
  6. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algobase.h:65:
  7. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator_base_types.h:71:
  8. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:927:13: error: no matching function for call to '__ranges_begin'
  9. = decltype(__detail::__ranges_begin(std::declval<_Tp&>()));
  10. ^~~~~~~~~~~~~~~~~~~~~~~~
  11. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:884:5: note: in instantiation of template type alias '__range_iter_t' requested here
  12. using iterator_t = std::__detail::__range_iter_t<_Tp>;
  13. ^
  14. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:134:43: note: in instantiation of template type alias 'iterator_t' requested here
  15. data() requires contiguous_iterator<iterator_t<_Derived>>
  16. ^
  17. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1226:29: note: in instantiation of template class 'std::ranges::view_interface<std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > >' requested here
  18. class ref_view : public view_interface<ref_view<_Range>>
  19. ^
  20. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1284:32: note: in instantiation of template class 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' requested here
  21. else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; })
  22. ^
  23. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1284:32: note: in instantiation of requirement here
  24. else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; })
  25. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  27. requires requires { declval<_Callable>()(declval<_Range>()); }
  28. ^
  29. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of function template specialization 'std::ranges::views::(anonymous class)::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  30. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of requirement here
  31. requires requires { declval<_Callable>()(declval<_Range>()); }
  32. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:13: note: while substituting template arguments into constraint expression here
  34. requires requires { declval<_Callable>()(declval<_Range>()); }
  35. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  36. test.cc:14:32: note: while checking constraint satisfaction for template 'operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' required here
  37. for(auto s : std::views::keys(lol))
  38. ^
  39. test.cc:14:32: note: in instantiation of function template specialization 'std::ranges::views::__adaptor::_RangeAdaptorClosure<std::ranges::views::(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  40. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:910:7: note: candidate template ignored: constraints not satisfied [with _Tp = std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >]
  41. __ranges_begin(_Tp& __t)
  42. ^
  43. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:908:16: note: because 'is_array_v<std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > >' evaluated to false
  44. requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
  45. ^
  46. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:908:35: note: and 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > &' does not satisfy '__member_begin'
  47. requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
  48. ^
  49. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:892:33: note: because '__detail::__decay_copy(__t.begin())' would be invalid: no member named 'begin' in 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >'
  50. { __detail::__decay_copy(__t.begin()) } -> input_or_output_iterator;
  51. ^
  52. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:908:59: note: and 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > &' does not satisfy '__adl_begin'
  53. requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
  54. ^
  55. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:902:29: note: because '__detail::__decay_copy(begin(__t))' would be invalid: call to deleted function 'begin'
  56. { __detail::__decay_copy(begin(__t)) } -> input_or_output_iterator;
  57. ^
  58. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:927:13: error: no matching function for call to '__ranges_begin'
  59. = decltype(__detail::__ranges_begin(std::declval<_Tp&>()));
  60. ^~~~~~~~~~~~~~~~~~~~~~~~
  61. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:884:5: note: in instantiation of template type alias '__range_iter_t' requested here
  62. using iterator_t = std::__detail::__range_iter_t<_Tp>;
  63. ^
  64. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:140:25: note: in instantiation of template type alias 'iterator_t' requested here
  65. && contiguous_iterator<iterator_t<const _Derived>>
  66. ^
  67. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1226:29: note: in instantiation of template class 'std::ranges::view_interface<std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > >' requested here
  68. class ref_view : public view_interface<ref_view<_Range>>
  69. ^
  70. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1284:32: note: in instantiation of template class 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' requested here
  71. else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; })
  72. ^
  73. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1284:32: note: in instantiation of requirement here
  74. else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; })
  75. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  76. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  77. requires requires { declval<_Callable>()(declval<_Range>()); }
  78. ^
  79. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of function template specialization 'std::ranges::views::(anonymous class)::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  80. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of requirement here
  81. requires requires { declval<_Callable>()(declval<_Range>()); }
  82. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:13: note: while substituting template arguments into constraint expression here
  84. requires requires { declval<_Callable>()(declval<_Range>()); }
  85. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  86. test.cc:14:32: note: while checking constraint satisfaction for template 'operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' required here
  87. for(auto s : std::views::keys(lol))
  88. ^
  89. test.cc:14:32: note: in instantiation of function template specialization 'std::ranges::views::__adaptor::_RangeAdaptorClosure<std::ranges::views::(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  90. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:910:7: note: candidate template ignored: constraints not satisfied [with _Tp = const std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >]
  91. __ranges_begin(_Tp& __t)
  92. ^
  93. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:908:16: note: because 'is_array_v<const std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > >' evaluated to false
  94. requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
  95. ^
  96. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:908:35: note: and 'const std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > &' does not satisfy '__member_begin'
  97. requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
  98. ^
  99. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:892:33: note: because '__detail::__decay_copy(__t.begin())' would be invalid: no member named 'begin' in 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >'
  100. { __detail::__decay_copy(__t.begin()) } -> input_or_output_iterator;
  101. ^
  102. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:908:59: note: and 'const std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > &' does not satisfy '__adl_begin'
  103. requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
  104. ^
  105. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/iterator_concepts.h:902:29: note: because '__detail::__decay_copy(begin(__t))' would be invalid: call to deleted function 'begin'
  106. { __detail::__decay_copy(begin(__t)) } -> input_or_output_iterator;
  107. ^
  108. In file included from test.cc:3:
  109. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/algorithm:64:
  110. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algo.h:35:
  111. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algobase.h:38:
  112. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:146:24: error: constraints not satisfied for alias template 'sentinel_t' [with _Range = std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >]
  113. && sized_sentinel_for<sentinel_t<_Derived>, iterator_t<_Derived>>
  114. ^~~~~~~~~~~~~~~~~~~~
  115. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1226:29: note: in instantiation of template class 'std::ranges::view_interface<std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > > >' requested here
  116. class ref_view : public view_interface<ref_view<_Range>>
  117. ^
  118. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1284:32: note: in instantiation of template class 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' requested here
  119. else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; })
  120. ^
  121. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1284:32: note: in instantiation of requirement here
  122. else if constexpr (requires { ref_view{std::forward<_Range>(__r)}; })
  123. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  124. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of function template specialization 'std::ranges::views::(anonymous class)::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  125. requires requires { declval<_Callable>()(declval<_Range>()); }
  126. ^
  127. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of requirement here
  128. requires requires { declval<_Callable>()(declval<_Range>()); }
  129. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  130. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:13: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  131. requires requires { declval<_Callable>()(declval<_Range>()); }
  132. ^
  133. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of function template specialization 'std::ranges::views::(anonymous class)::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  134. requires requires { declval<_Callable>()(declval<_Range>()); }
  135. ^
  136. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of requirement here
  137. requires requires { declval<_Callable>()(declval<_Range>()); }
  138. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:13: note: while substituting template arguments into constraint expression here
  140. requires requires { declval<_Callable>()(declval<_Range>()); }
  141. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  142. test.cc:14:32: note: while checking constraint satisfaction for template 'operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' required here
  143. for(auto s : std::views::keys(lol))
  144. ^
  145. test.cc:14:32: note: in instantiation of function template specialization 'std::ranges::views::__adaptor::_RangeAdaptorClosure<std::ranges::views::(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  146. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:886:12: note: because 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' does not satisfy 'range'
  147. template<range _Range>
  148. ^
  149. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:874:2: note: because 'ranges::begin(__t)' would be invalid: no matching function for call to object of type 'const __cust_access::_Begin'
  150. ranges::begin(__t);
  151. ^
  152. In file included from test.cc:3:
  153. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/algorithm:64:
  154. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algo.h:35:
  155. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algobase.h:38:
  156. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:152:24: error: constraints not satisfied for alias template 'sentinel_t' [with _Range = const std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >]
  157. && sized_sentinel_for<sentinel_t<const _Derived>,
  158. ^~~~~~~~~~~~~~~~~~~~~~~~~~
  159. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:886:12: note: because 'const std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' does not satisfy 'range'
  160. template<range _Range>
  161. ^
  162. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:874:2: note: because 'ranges::begin(__t)' would be invalid: no matching function for call to object of type 'const __cust_access::_Begin'
  163. ranges::begin(__t);
  164. ^
  165. In file included from test.cc:3:
  166. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/algorithm:64:
  167. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algo.h:35:
  168. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algobase.h:38:
  169. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3680:14: error: constraints not satisfied for class template 'elements_view' [with _Vp = std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >, _Nm = 0]
  170. using _El = elements_view<views::all_t<_Range>, _Nm>;
  171. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  172. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of function template specialization 'std::ranges::views::(anonymous class)::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  173. requires requires { declval<_Callable>()(declval<_Range>()); }
  174. ^
  175. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: in instantiation of requirement here
  176. requires requires { declval<_Callable>()(declval<_Range>()); }
  177. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  178. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:13: note: while substituting template arguments into constraint expression here
  179. requires requires { declval<_Callable>()(declval<_Range>()); }
  180. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  181. test.cc:14:32: note: while checking constraint satisfaction for template 'operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' required here
  182. for(auto s : std::views::keys(lol))
  183. ^
  184. test.cc:14:32: note: in instantiation of function template specialization 'std::ranges::views::__adaptor::_RangeAdaptorClosure<std::ranges::views::(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>::operator()<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &>' requested here
  185. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3393:12: note: because 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' does not satisfy 'input_range'
  186. template<input_range _Vp, size_t _Nm>
  187. ^
  188. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:919:27: note: because 'std::ranges::ref_view<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > >' does not satisfy 'range'
  189. concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp>>;
  190. ^
  191. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:874:2: note: because 'ranges::begin(__t)' would be invalid: no matching function for call to object of type 'const __cust_access::_Begin'
  192. ranges::begin(__t);
  193. ^
  194. In file included from test.cc:3:
  195. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/algorithm:64:
  196. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algo.h:35:
  197. In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/ranges_algobase.h:38:
  198. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3681:9: error: no viable conversion from 'std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >' to '_El' (aka 'int')
  199. return _El{std::forward<_Range>(__r)};
  200. ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  201. test.cc:14:16: error: no matching function for call to object of type 'const __adaptor::_RangeAdaptorClosure<(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>' (aka 'const std::ranges::views::__adaptor::_RangeAdaptorClosure<std::ranges::views::(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>')
  202. for(auto s : std::views::keys(lol))
  203. ^~~~~~~~~~~~~~~~
  204. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1167:4: note: candidate template ignored: constraints not satisfied [with _Range = std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > &]
  205. operator()(_Range&& __r) const
  206. ^
  207. /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:1165:24: note: because 'declval<std::ranges::views::(lambda at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:3678:9)>()(declval<_Range>())' would be invalid
  208. requires requires { declval<_Callable>()(declval<_Range>()); }
  209. ^
  210. 7 errors generated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement