Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contribute? #1

Open
pradkrish opened this issue Dec 30, 2022 · 4 comments
Open

contribute? #1

pradkrish opened this issue Dec 30, 2022 · 4 comments

Comments

@pradkrish
Copy link
Contributor

Hello, happy to see a graph library using C++20 features. Is it possible to get involved in this project and help out in small ways? Thank you.

@fhamonic
Copy link
Owner

Hello, happy to see people interested in contributing :)
I see we both opened discussions on stdgraph/graph-v2 which is a C++20 graph library aiming to be standardized (in c++26 probably). Sooner or later, I would like to contribute to this larger project, as I suppose you would.
In the meantime, I implement graph algorithms as I need them for another project and focus on efficiency and performances. I use to run some benchmarks against other graph libraries here. I focused on directed graphs and I think that the API for those graphs is definitive (the customization point objects in include/melon/graph.hpp) and is sufficiently close to the one graph-v2 would have, so that transfers are possible in the future.

You can contribute in many ways:

  • Using the library and bringing up ideas for improvement or identifying bugs
  • Implementing your favorite graph algorithms
  • Writing code examples, documentation, test cases or even benchmarks...

As the library is at a fairly early stage, I am open to any contribution you may want to make.

@pradkrish
Copy link
Contributor Author

Yeah, you are right. I am trying to use different opportunities to practice C++20 features and I am happy that you are open to contribution. I will take some time to play around with the library to begin with.

As a starter, I am trying to compile the library at the root of the project by simply running make all and I get the following error

  5%] Building CXX object test/CMakeFiles/melon_test.dir/static_digraph_test.cpp.o
[ 10%] Building CXX object test/CMakeFiles/melon_test.dir/main_test.cpp.o
[ 15%] Building CXX object test/CMakeFiles/melon_test.dir/cpo_test.cpp.o
[ 20%] Building CXX object test/CMakeFiles/melon_test.dir/static_forward_digraph_test.cpp.o
/home/pradeep/repos/melon/test/cpo_test.cpp: In functionconstexpr auto vertices(const G&)’:
/home/pradeep/repos/melon/test/cpo_test.cpp:9:75: error: call to non-constexprfunctionstd::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::vector<long unsigned int>; _Alloc = std::allocator<std::vector<long unsigned int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
    9 | constexpr auto vertices(const G & g) { return std::views::iota(0ul, g.size()); }
      |                                                                     ~~~~~~^~
In file included from /usr/include/c++/11/vector:67,
                 from /home/pradeep/.conan/data/gtest/cci.20210126/_/_/package/3926571b75c3e9d8ffdffc9046889c9dc72c974c/include/gtest/gtest.h:60,
                 from /home/pradeep/repos/melon/test/cpo_test.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:918:7: note: ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::vector<long unsigned int>; _Alloc = std::allocator<std::vector<long unsigned int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ declared here
  918 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/home/pradeep/repos/melon/test/cpo_test.cpp: In functionconstexpr auto out_arcs(const G&, std::size_t)’:
/home/pradeep/repos/melon/test/cpo_test.cpp:11:40: error: call to non-constexprfunctionstd::vector<_Tp, _Alloc>::const_iterator std::vector<_Tp, _Alloc>::cbegin() const [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>; std::vector<_Tp, _Alloc>::const_iterator = std::vector<long unsigned int>::const_iterator]’
   11 |     return std::views::iota(g[v].cbegin(), g[v].cend());
      |                             ~~~~~~~~~~~^~
In file included from /usr/include/c++/11/vector:67,
                 from /home/pradeep/.conan/data/gtest/cci.20210126/_/_/package/3926571b75c3e9d8ffdffc9046889c9dc72c974c/include/gtest/gtest.h:60,
                 from /home/pradeep/repos/melon/test/cpo_test.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:884:7: note: ‘std::vector<_Tp, _Alloc>::const_iterator std::vector<_Tp, _Alloc>::cbegin() const [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>; std::vector<_Tp, _Alloc>::const_iterator = std::vector<long unsigned int>::const_iterator]’ declared here
  884 |       cbegin() const noexcept
      |       ^~~~~~
In file included from /home/pradeep/repos/melon/test/cpo_test.cpp:23:
/home/pradeep/repos/melon/include/melon/graph.hpp: In substitution oftemplate<class _ValueType, class _Tp>  requires requires(const _Tp& __t) {{}.operator()<_ValueType>(__t);} constexpr auto fhamonic::melon::__cust::create_arc_map(const _Tp&) [with _ValueType = long unsigned int; _Tp = std::vector<std::vector<long unsigned int> >]’:
/home/pradeep/repos/melon/include/melon/graph.hpp:1348:35:   required by substitution oftemplate<class _ValueType, class _Tp>  requires (__member_create_arc_map<_Tp, _ValueType>) || (__adl_create_arc_map<_Tp, _ValueType>) constexpr auto fhamonic::melon::__cust_access::_CreateArcMap::operator()(const _Tp&) const [with _ValueType = long unsigned int; _Tp = std::vector<std::vector<long unsigned int> >]’
/home/pradeep/repos/melon/include/melon/graph.hpp:1414:67:   required by substitution oftemplate<class _ValueType, class _Tp>  requires requires(const _Tp& __t) {{}.operator()<_ValueType>(__t);} constexpr auto fhamonic::melon::__cust::create_arc_map(const _Tp&) [with _ValueType = long unsigned int; _Tp = std::vector<std::vector<long unsigned int> >]’
/home/pradeep/repos/melon/include/melon/graph.hpp:1449:38:   required from here
/home/pradeep/repos/melon/include/melon/graph.hpp:1416:23:   required by the constraints oftemplate<class _ValueType, class _Tp>  requires requires(const _Tp& __t) {{}.operator()<_ValueType>(__t);} constexpr auto fhamonic::melon::__cust::create_arc_map(const _Tp&)’
/home/pradeep/repos/melon/include/melon/graph.hpp:1413:10:   in requirements withconst _Tp& __t’ [with _ValueType = long unsigned int; _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/home/pradeep/repos/melon/include/melon/graph.hpp:1413:10: error: satisfaction of atomic constraintrequires(const _Tp& __t) {{}.operator()<_ValueType>(__t);} [with _ValueType = _ValueType; _Tp = _Tp]’ depends on itself
 1413 | requires requires(const _Tp & __t) {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 1414 |     __cust_access::_CreateArcMap{}.template operator()<_ValueType>(__t);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1415 | }
      | ~         
/home/pradeep/repos/melon/test/cpo_test.cpp: In member functionvirtual void CPO_test_Test::TestBody()’:
/home/pradeep/repos/melon/test/cpo_test.cpp:45:51: error: no match for call to ‘(const std::ranges::views::_All) (std::vector<std::vector<long unsigned int> >)’
   45 |                   decltype(std::ranges::views::all(std::declval<G>()))>);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /home/pradeep/repos/melon/test/cpo_test.cpp:4:
/usr/include/c++/11/ranges:1117:9: note: candidate: ‘template<class _Range>  requires (viewable_range<_Range>) && ((view<typename std::decay<_Tp>::type>) || (__can_ref_view<_Range>) || (__can_subrange<_Range>)) constexpr auto std::ranges::views::_All::operator()(_Range&&) const1117 |         operator()(_Range&& __r) const
      |         ^~~~~~~~
/usr/include/c++/11/ranges:1117:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11/ranges:1117:9: note: constraints not satisfied
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/bits/unique_ptr.h:42,
                 from /usr/include/c++/11/memory:76,
                 from /home/pradeep/.conan/data/gtest/cci.20210126/_/_/package/3926571b75c3e9d8ffdffc9046889c9dc72c974c/include/gtest/gtest.h:57,
                 from /home/pradeep/repos/melon/test/cpo_test.cpp:1:
/home/pradeep/repos/melon/test/cpo_test.cpp: In substitution oftemplate<class _Range>  requires (viewable_range<_Range>) && ((view<typename std::decay<_Tp>::type>) || (__can_ref_view<_Range>) || (__can_subrange<_Range>)) constexpr auto std::ranges::views::_All::operator()(_Range&&) const [with _Range = std::vector<std::vector<long unsigned int> >]’:
/home/pradeep/repos/melon/test/cpo_test.cpp:45:51:   required from here
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:668:11: note: no operand of the disjunction is satisfied
  667 |       && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668 |           || (!view<remove_cvref_t<_Tp>> && borrowed_range<_Tp>));
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:667:38: note: the operand ‘(view<typename std::remove_cvref<_Tp>::type> && constructible_from<typename std::remove_cvref<_Tp>::type, _Tp>)’ is unsatisfied because
  667 |       && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668 |           || (!view<remove_cvref_t<_Tp>> && borrowed_range<_Tp>));
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:621:13:   required for the satisfaction ofview<typename std::remove_cvref<_Tp>::type>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:622:39: note: the expressionenable_view<_Tp> [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]’ evaluated tofalse622 |       = range<_Tp> && movable<_Tp> && enable_view<_Tp>;
      |                                       ^~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:668:42: note: the operand ‘((! view<typename std::remove_cvref<_Tp>::type>) && borrowed_range<_Tp>)’ is unsatisfied because
  667 |       && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668 |           || (!view<remove_cvref_t<_Tp>> && borrowed_range<_Tp>));
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:83:15:   required for the satisfaction of__maybe_borrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:582:13:   required for the satisfaction ofborrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:85:11: note: no operand of the disjunction is satisfied
   84 |         = is_lvalue_reference_v<_Tp>
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:84:11: note: the operandis_lvalue_reference_v<_Tp>is unsatisfied because
   84 |         = is_lvalue_reference_v<_Tp>
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:83:15:   required for the satisfaction of__maybe_borrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:582:13:   required for the satisfaction ofborrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:84:11: note: the expressionis_lvalue_reference_v<_Tp> [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]’ evaluated tofalse84 |         = is_lvalue_reference_v<_Tp>
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:85:14: note: the operandenable_borrowed_range<std::remove_cvref_t<_Tp1> >is unsatisfied because
   84 |         = is_lvalue_reference_v<_Tp>
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:83:15:   required for the satisfaction of__maybe_borrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:582:13:   required for the satisfaction ofborrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:85:14: note: the expressionenable_borrowed_range<typename std::remove_cvref<_Tp>::type> [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]’ evaluated tofalse85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pradeep/repos/melon/test/cpo_test.cpp:45:51: error: no match for call to ‘(const std::ranges::views::_All) (std::vector<std::vector<long unsigned int> >)’
   45 |                   decltype(std::ranges::views::all(std::declval<G>()))>);
      |                            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /home/pradeep/repos/melon/test/cpo_test.cpp:4:
/usr/include/c++/11/ranges:1117:9: note: candidate: ‘template<class _Range>  requires (viewable_range<_Range>) && ((view<typename std::decay<_Tp>::type>) || (__can_ref_view<_Range>) || (__can_subrange<_Range>)) constexpr auto std::ranges::views::_All::operator()(_Range&&) const1117 |         operator()(_Range&& __r) const
      |         ^~~~~~~~
/usr/include/c++/11/ranges:1117:9: note:   template argument deduction/substitution failed:
/usr/include/c++/11/ranges:1117:9: note: constraints not satisfied
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/bits/unique_ptr.h:42,
                 from /usr/include/c++/11/memory:76,
                 from /home/pradeep/.conan/data/gtest/cci.20210126/_/_/package/3926571b75c3e9d8ffdffc9046889c9dc72c974c/include/gtest/gtest.h:57,
                 from /home/pradeep/repos/melon/test/cpo_test.cpp:1:
/home/pradeep/repos/melon/test/cpo_test.cpp: In substitution oftemplate<class _Range>  requires (viewable_range<_Range>) && ((view<typename std::decay<_Tp>::type>) || (__can_ref_view<_Range>) || (__can_subrange<_Range>)) constexpr auto std::ranges::views::_All::operator()(_Range&&) const [with _Range = std::vector<std::vector<long unsigned int> >]’:
/home/pradeep/repos/melon/test/cpo_test.cpp:45:51:   required from here
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:668:11: note: no operand of the disjunction is satisfied
  667 |       && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668 |           || (!view<remove_cvref_t<_Tp>> && borrowed_range<_Tp>));
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:667:38: note: the operand ‘(view<typename std::remove_cvref<_Tp>::type> && constructible_from<typename std::remove_cvref<_Tp>::type, _Tp>)’ is unsatisfied because
  667 |       && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668 |           || (!view<remove_cvref_t<_Tp>> && borrowed_range<_Tp>));
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:621:13:   required for the satisfaction ofview<typename std::remove_cvref<_Tp>::type>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:622:39: note: the expressionenable_view<_Tp> [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]’ evaluated tofalse622 |       = range<_Tp> && movable<_Tp> && enable_view<_Tp>;
      |                                       ^~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:668:42: note: the operand ‘((! view<typename std::remove_cvref<_Tp>::type>) && borrowed_range<_Tp>)’ is unsatisfied because
  667 |       && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>)
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  668 |           || (!view<remove_cvref_t<_Tp>> && borrowed_range<_Tp>));
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:83:15:   required for the satisfaction of__maybe_borrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:582:13:   required for the satisfaction ofborrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:85:11: note: no operand of the disjunction is satisfied
   84 |         = is_lvalue_reference_v<_Tp>
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:84:11: note: the operandis_lvalue_reference_v<_Tp>is unsatisfied because
   84 |         = is_lvalue_reference_v<_Tp>
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:83:15:   required for the satisfaction of__maybe_borrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:582:13:   required for the satisfaction ofborrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:84:11: note: the expressionis_lvalue_reference_v<_Tp> [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]’ evaluated tofalse84 |         = is_lvalue_reference_v<_Tp>
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:85:14: note: the operandenable_borrowed_range<std::remove_cvref_t<_Tp1> >is unsatisfied because
   84 |         = is_lvalue_reference_v<_Tp>
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ranges_base.h:83:15:   required for the satisfaction of__maybe_borrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:582:13:   required for the satisfaction ofborrowed_range<_Tp>’ [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:666:13:   required for the satisfaction ofviewable_range<_Range>’ [with _Range = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]
/usr/include/c++/11/bits/ranges_base.h:85:14: note: the expressionenable_borrowed_range<typename std::remove_cvref<_Tp>::type> [with _Tp = std::vector<std::vector<long unsigned int, std::allocator<long unsigned int> >, std::allocator<std::vector<long unsigned int, std::allocator<long unsigned int> > > >]’ evaluated tofalse85 |           || enable_borrowed_range<remove_cvref_t<_Tp>>;
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pradeep/repos/melon/test/cpo_test.cpp:44:32: error: template argument 1 is invalid
   44 |     static_assert(std::ranges::contiguous_range<
      |                                ^~~~~~~~~~~~~~~~~
   45 |                   decltype(std::ranges::views::all(std::declval<G>()))>);
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 25%] Building CXX object test/CMakeFiles/melon_test.dir/dumb_digraph_test.cpp.o

is this expected? Thanks.

@fhamonic
Copy link
Owner

Hi, The compiler is complaining about constexpr on vector::size(), maybe I used constexpr a little too much, but here vector::size() should work since C++20, try GCC 12 I think.

@pradkrish
Copy link
Contributor Author

Thanks, that worked :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants