Last active
June 25, 2021 02:42
-
-
Save yohhoy/4ff16f93d62e35be3788c5cdca5858d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prog.cc: In function 'int main()': | |
prog.cc:6:19: error: no match for 'operator|' (operand types are 'std::forward_list<int, std::allocator<int> >' and 'const std::ranges::views::_Reverse') | |
6 | for (int _: lst | std::views::reverse) {} | |
| ~~~ ^ ~~~~~~~~~~~~~~~~~~~ | |
| | | | |
| | const std::ranges::views::_Reverse | |
| std::forward_list<int, std::allocator<int> > | |
In file included from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:818:7: note: candidate: 'template<class _Lhs, class _Rhs> requires (derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (derived_from<_Rhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) constexpr auto std::ranges::views::__adaptor::operator|(_Lhs, _Rhs)' | |
818 | operator|(_Lhs __lhs, _Rhs __rhs) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:818:7: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:818:7: note: constraints not satisfied | |
In file included from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/iterator_concepts.h:35, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/stl_iterator_base_types.h:71, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/forward_list.h:36, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/forward_list:38, | |
from prog.cc:1: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts: In substitution of 'template<class _Lhs, class _Rhs> requires (derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (derived_from<_Rhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) constexpr auto std::ranges::views::__adaptor::operator|(_Lhs, _Rhs) [with _Lhs = std::forward_list<int, std::allocator<int> >; _Rhs = std::ranges::views::_Reverse]': | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts:67:13: required for the satisfaction of 'derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>' [with _Lhs = std::forward_list<int, std::allocator<int> >] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts:67:28: note: 'std::ranges::views::__adaptor::_RangeAdaptorClosure' is not a base of 'std::forward_list<int, std::allocator<int> >' | |
67 | concept derived_from = __is_base_of(_Base, _Derived) | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
In file included from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:809:7: note: candidate: 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&)' | |
809 | operator|(_Range&& __r, _Self&& __self) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:809:7: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:809:7: note: constraints not satisfied | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges: In substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]': | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:781:13: required for the satisfaction of '__adaptor_invocable<_Self, _Range>' [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:9: in requirements [with _Args = {std::forward_list<int, std::allocator<int> >&}; _Adaptor = const std::ranges::views::_Reverse&] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: note: the required expression 'declval<_Adaptor>()((declval<_Args>)()...)' is invalid, because | |
782 | = requires { std::declval<_Adaptor>()(declval<_Args>()...); }; | |
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: error: no match for call to '(const std::ranges::views::_Reverse) (std::forward_list<int, std::allocator<int> >&)' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3729:9: note: candidate: 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const' | |
3729 | operator()(_Range&& __r) const | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3729:9: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3729:9: note: constraints not satisfied | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges: In substitution of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const [with _Range = std::forward_list<int, std::allocator<int> >&]': | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: required by substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]' | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3729:2: required by the constraints of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3727:11: note: no operand of the disjunction is satisfied | |
3725 | requires __detail::__is_reverse_view<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3726 | || __detail::__is_reversible_subrange<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3727 | || __detail::__can_reverse_view<_Range> | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3725:28: note: the operand '__is_reverse_view<std::remove_cvref_t<_Tp1> >' is unsatisfied because | |
3725 | requires __detail::__is_reverse_view<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3726 | || __detail::__is_reversible_subrange<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3727 | || __detail::__can_reverse_view<_Range> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3729:2: required by the constraints of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3725:28: note: the expression '__is_reverse_view<typename std::remove_cvref<_Tp>::type> [with _Range = std::forward_list<int, std::allocator<int> >&]' evaluated to 'false' | |
3725 | requires __detail::__is_reverse_view<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3726:24: note: the operand '__is_reversible_subrange<std::remove_cvref_t<_Tp1> >' is unsatisfied because | |
3725 | requires __detail::__is_reverse_view<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3726 | || __detail::__is_reversible_subrange<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3727 | || __detail::__can_reverse_view<_Range> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3729:2: required by the constraints of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3726:24: note: the expression '__is_reversible_subrange<typename std::remove_cvref<_Tp>::type> [with _Range = std::forward_list<int, std::allocator<int> >&]' evaluated to 'false' | |
3726 | || __detail::__is_reversible_subrange<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3727:24: note: the operand '__can_reverse_view<_Range>' is unsatisfied because | |
3725 | requires __detail::__is_reverse_view<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3726 | || __detail::__is_reversible_subrange<remove_cvref_t<_Range>> | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
3727 | || __detail::__can_reverse_view<_Range> | |
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3718:10: required for the satisfaction of '__can_reverse_view<_Range>' [with _Range = std::forward_list<int, std::allocator<int> >&] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:6: in requirements [with _Range = std::forward_list<int, std::allocator<int> >&] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:24: note: the required expression 'reverse_view<...auto...>{declval<_Range>()}' is invalid, because | |
3719 | = requires { reverse_view{std::declval<_Range>()}; }; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:24: error: class template argument deduction failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:24: error: no matching function for call to 'reverse_view(std::forward_list<int, std::allocator<int> >&)' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3641:7: note: candidate: 'template<class _Vp> reverse_view(_Vp)-> std::ranges::reverse_view<_Vp>' | |
3641 | reverse_view(_Vp __r) | |
| ^~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3641:7: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges: In substitution of 'template<class _Vp> reverse_view(_Vp)-> std::ranges::reverse_view<_Vp> [with _Vp = std::forward_list<int, std::allocator<int> >]': | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:17: required by substitution of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const [with _Range = std::forward_list<int, std::allocator<int> >&]' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: required by substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]' | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3641:7: error: template constraint failure for 'template<class _Vp> requires (view<_Vp>) && (bidirectional_range<_Vp>) class std::ranges::reverse_view' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3641:7: note: constraints not satisfied | |
In file included from /opt/wandbox/gcc-head/include/c++/12.0.0/string_view:44, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/basic_string.h:48, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/string:55, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/locale_classes.h:40, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:41, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/streambuf:41, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/streambuf_iterator.h:35, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/iterator:66, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/ranges:43, | |
from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ranges_base.h: In substitution of 'template<class _Vp> requires (view<_Vp>) && (bidirectional_range<_Vp>) class std::ranges::reverse_view [with _Vp = std::forward_list<int, std::allocator<int> >]': | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3641:7: required by substitution of 'template<class _Vp> reverse_view(_Vp)-> std::ranges::reverse_view<_Vp> [with _Vp = std::forward_list<int, std::allocator<int> >]' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:17: required by substitution of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const [with _Range = std::forward_list<int, std::allocator<int> >&]' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: required by substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]' | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ranges_base.h:621:13: required for the satisfaction of 'view<_Vp>' [with _Vp = std::forward_list<int, std::allocator<int> >] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ranges_base.h:622:39: note: the expression 'enable_view<_Tp> [with _Tp = std::forward_list<int, std::allocator<int> >]' evaluated to 'false' | |
622 | = range<_Tp> && movable<_Tp> && enable_view<_Tp>; | |
| ^~~~~~~~~~~~~~~~ | |
In file included from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges: In substitution of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const [with _Range = std::forward_list<int, std::allocator<int> >&]': | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: required by substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]' | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3638:7: note: candidate: 'template<class _Vp> reverse_view()-> std::ranges::reverse_view<_Vp> requires default_initializable<_Vp>' | |
3638 | reverse_view() requires default_initializable<_Vp> = default; | |
| ^~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3638:7: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:24: note: candidate expects 0 arguments, 1 provided | |
3719 | = requires { reverse_view{std::declval<_Range>()}; }; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3623:11: note: candidate: 'template<class _Vp> reverse_view(std::ranges::reverse_view<_Vp>)-> std::ranges::reverse_view<_Vp>' | |
3623 | class reverse_view : public view_interface<reverse_view<_Vp>> | |
| ^~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3623:11: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:24: note: 'std::forward_list<int, std::allocator<int> >' is not derived from 'std::ranges::reverse_view<_Vp>' | |
3719 | = requires { reverse_view{std::declval<_Range>()}; }; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3692:5: note: candidate: 'template<class _Range> std::ranges::reverse_view(_Range&&)-> std::ranges::reverse_view<std::ranges::views::all_t<_Range> >' | |
3692 | reverse_view(_Range&&) -> reverse_view<views::all_t<_Range>>; | |
| ^~~~~~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3692:5: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges: In substitution of 'template<class _Range> std::ranges::reverse_view(_Range&&)-> std::ranges::reverse_view<std::ranges::views::all_t<_Range> > [with _Range = std::forward_list<int, std::allocator<int> >&]': | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:17: required by substitution of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const [with _Range = std::forward_list<int, std::allocator<int> >&]' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: required by substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]' | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3692:5: error: template constraint failure for 'template<class _Vp> requires (view<_Vp>) && (bidirectional_range<_Vp>) class std::ranges::reverse_view' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3692:5: note: constraints not satisfied | |
In file included from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/iterator_concepts.h:35, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/stl_iterator_base_types.h:71, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/forward_list.h:36, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/forward_list:38, | |
from prog.cc:1: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts: In substitution of 'template<class _Vp> requires (view<_Vp>) && (bidirectional_range<_Vp>) class std::ranges::reverse_view [with _Vp = std::ranges::ref_view<std::forward_list<int, std::allocator<int> > >]': | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3692:5: required by substitution of 'template<class _Range> std::ranges::reverse_view(_Range&&)-> std::ranges::reverse_view<std::ranges::views::all_t<_Range> > [with _Range = std::forward_list<int, std::allocator<int> >&]' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:3719:17: required by substitution of 'template<class _Range> requires (viewable_range<_Range>) && ((__is_reverse_view<typename std::remove_cvref<_Tp>::type>) || (__is_reversible_subrange<typename std::remove_cvref<_Tp>::type>) || (__can_reverse_view<_Range>)) constexpr auto std::ranges::views::_Reverse::operator()(_Range&&) const [with _Range = std::forward_list<int, std::allocator<int> >&]' | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: required by substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]' | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts:67:13: required for the satisfaction of 'derived_from<typename std::__detail::__iter_concept_impl<_Iter>::type, std::bidirectional_iterator_tag>' [with _Iter = std::_Fwd_list_iterator<int>] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/iterator_concepts.h:649:13: required for the satisfaction of 'bidirectional_iterator<decltype (std::ranges::__cust_access::__begin(declval<_Container&>()))>' [with _Tp = std::ranges::ref_view<std::forward_list<int, std::allocator<int> > >] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ranges_base.h:642:13: required for the satisfaction of 'bidirectional_range<_Vp>' [with _Vp = std::ranges::ref_view<std::forward_list<int, std::allocator<int> > >] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts:67:28: note: 'std::bidirectional_iterator_tag' is not a base of 'std::forward_iterator_tag' | |
67 | concept derived_from = __is_base_of(_Base, _Derived) | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
In file included from /opt/wandbox/gcc-head/include/c++/12.0.0/streambuf:41, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/streambuf_iterator.h:35, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/iterator:66, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/ranges:43, | |
from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:87:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator|(std::_Ios_Fmtflags, std::_Ios_Fmtflags)' | |
87 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:87:27: note: no known conversion for argument 1 from 'std::forward_list<int, std::allocator<int> >' to 'std::_Ios_Fmtflags' | |
87 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
| ~~~~~~~~~~~~~~^~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:129:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator|(std::_Ios_Openmode, std::_Ios_Openmode)' | |
129 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:129:27: note: no known conversion for argument 1 from 'std::forward_list<int, std::allocator<int> >' to 'std::_Ios_Openmode' | |
129 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
| ~~~~~~~~~~~~~~^~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:169:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator|(std::_Ios_Iostate, std::_Ios_Iostate)' | |
169 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:169:26: note: no known conversion for argument 1 from 'std::forward_list<int, std::allocator<int> >' to 'std::_Ios_Iostate' | |
169 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
| ~~~~~~~~~~~~~^~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prog.cc: In function 'int main()': | |
prog.cc:6:19: error: no match for 'operator|' (operand types are 'std::forward_list<int, std::allocator<int> >' and 'const std::ranges::views::_Reverse') | |
6 | for (int _: lst | std::views::reverse) {} | |
| ~~~ ^ ~~~~~~~~~~~~~~~~~~~ | |
| | | | |
| | const std::ranges::views::_Reverse | |
| std::forward_list<int, std::allocator<int> > | |
In file included from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:818:7: note: candidate: 'template<class _Lhs, class _Rhs> requires (derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (derived_from<_Rhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) constexpr auto std::ranges::views::__adaptor::operator|(_Lhs, _Rhs)' | |
818 | operator|(_Lhs __lhs, _Rhs __rhs) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:818:7: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:818:7: note: constraints not satisfied | |
In file included from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/iterator_concepts.h:35, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/stl_iterator_base_types.h:71, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/forward_list.h:36, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/forward_list:38, | |
from prog.cc:1: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts: In substitution of 'template<class _Lhs, class _Rhs> requires (derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (derived_from<_Rhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>) constexpr auto std::ranges::views::__adaptor::operator|(_Lhs, _Rhs) [with _Lhs = std::forward_list<int, std::allocator<int> >; _Rhs = std::ranges::views::_Reverse]': | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts:67:13: required for the satisfaction of 'derived_from<_Lhs, std::ranges::views::__adaptor::_RangeAdaptorClosure>' [with _Lhs = std::forward_list<int, std::allocator<int> >] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/concepts:67:28: note: 'std::ranges::views::__adaptor::_RangeAdaptorClosure' is not a base of 'std::forward_list<int, std::allocator<int> >' | |
67 | concept derived_from = __is_base_of(_Base, _Derived) | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
In file included from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:809:7: note: candidate: 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&)' | |
809 | operator|(_Range&& __r, _Self&& __self) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:809:7: note: template argument deduction/substitution failed: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:809:7: note: constraints not satisfied | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges: In substitution of 'template<class _Self, class _Range> requires (derived_from<typename std::remove_cvref<_Tp>::type, std::ranges::views::__adaptor::_RangeAdaptorClosure>) && (__adaptor_invocable<_Self, _Range>) constexpr auto std::ranges::views::__adaptor::operator|(_Range&&, _Self&&) [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&]': | |
prog.cc:6:33: required from here | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:781:13: required for the satisfaction of '__adaptor_invocable<_Self, _Range>' [with _Self = const std::ranges::views::_Reverse&; _Range = std::forward_list<int, std::allocator<int> >&] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:9: in requirements [with _Args = {std::forward_list<int, std::allocator<int> >&}; _Adaptor = const std::ranges::views::_Reverse&] | |
/opt/wandbox/gcc-head/include/c++/12.0.0/ranges:782:44: note: the required expression 'declval<_Adaptor>()((declval<_Args>)()...)' is invalid | |
782 | = requires { std::declval<_Adaptor>()(declval<_Args>()...); }; | |
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ | |
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail | |
In file included from /opt/wandbox/gcc-head/include/c++/12.0.0/streambuf:41, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/bits/streambuf_iterator.h:35, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/iterator:66, | |
from /opt/wandbox/gcc-head/include/c++/12.0.0/ranges:43, | |
from prog.cc:2: | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:87:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator|(std::_Ios_Fmtflags, std::_Ios_Fmtflags)' | |
87 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:87:27: note: no known conversion for argument 1 from 'std::forward_list<int, std::allocator<int> >' to 'std::_Ios_Fmtflags' | |
87 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
| ~~~~~~~~~~~~~~^~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:129:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator|(std::_Ios_Openmode, std::_Ios_Openmode)' | |
129 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:129:27: note: no known conversion for argument 1 from 'std::forward_list<int, std::allocator<int> >' to 'std::_Ios_Openmode' | |
129 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
| ~~~~~~~~~~~~~~^~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:169:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator|(std::_Ios_Iostate, std::_Ios_Iostate)' | |
169 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
| ^~~~~~~~ | |
/opt/wandbox/gcc-head/include/c++/12.0.0/bits/ios_base.h:169:26: note: no known conversion for argument 1 from 'std::forward_list<int, std::allocator<int> >' to 'std::_Ios_Iostate' | |
169 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
| ~~~~~~~~~~~~~^~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <forward_list> | |
#include <ranges> | |
int main() { | |
std::forward_list lst = {1, 2, 3, 4, 5}; | |
for (int _: lst | std::views::reverse) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment