Hi Andrew,

Thanks for the offer! I'm currently mostly stuck on trying to understand the 
compile error I'm getting (attached). There's simply too much information 
there and I don't know which is the bit I need to focus on.

There is

error: no match for ‘operator==’  (operand types are ‘const 
oqgraph3::in_edge_iterator’ and ‘const oqgraph3::in_edge_iterator’)
note: candidate: bool oqgraph3::in_edge_iterator::operator==(const self&) 
<near match>

and

error: no match for ‘operator*’ (operand type is ‘const 
oqgraph3::in_edge_iterator’)
note: candidate: oqgraph3::in_edge_iterator::value_type 
oqgraph3::in_edge_iterator::operator*() <near match>

and

note:   ‘const oqgraph3::in_edge_iterator’ is not derived from ‘const 
boost::iterators::iterator_facade<Derived1, V1, TC1, Reference1, Difference1>’

which look like the most-likely suspects, but there might be something else I 
don't see currently.

If these are indeed the points to tackle, then I'm not really sure what to 
do...

Grs,
Heinz

On Monday, 17 October 2016 18:08:57 CEST Andrew McDonnell wrote:
> Hi Heinz
> 
> Unfortunately I havent looked at any of this for some time.
> 
> Please do let me know areas you need help, and I can at least try and guide
> you through, with luck we can muddle through together
> 
> cheers,
> Andrew
> 
> On 08/10/16 19:45, Heinz Wiesinger wrote:
> > Hello all!
> > 
> > As part of finishing up the implementation of my "leaves" algorithm I
> > looked into reverse qraph queries and unfortunately found that none of
> > them work as expected :(
> > 
> > Bug filed: https://jira.mariadb.org/browse/MDEV-10980
> > 
> > I tried looking into the code and saw that a reverse graph is generated
> > 
> > reverse_graph<Graph> r(share->g);
> > 
> > but not used. Simply replacing the uses (replace share->g with r) however
> > results in compiler errors about missing operator overloads in the
> > iterators. I can try fix this but I would need some pointers, as it is,
> > it is slightly beyond me :(
> > 
> > Grs,
> > Heinz

[ 61%] Building CXX object storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o
In file included from /usr/include/boost/iterator/reverse_iterator.hpp:12:0,
                 from /usr/include/boost/range/reverse_iterator.hpp:21,
                 from /usr/include/boost/range/rbegin.hpp:19,
                 from /usr/include/boost/range/functions.hpp:23,
                 from /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:29,
                 from /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:20,
                 from /usr/include/boost/ptr_container/ptr_deque.hpp:20,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_thunk.h:39,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:27,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/usr/include/boost/iterator/iterator_adaptor.hpp: In instantiation of ‘bool boost::iterators::iterator_adaptor<Derived, Base, Value, Traversal, Reference, Difference>::equal(const boost::iterators::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D>&) const [with OtherDerived = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; OtherIterator = oqgraph3::in_edge_iterator; V = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; C = boost::iterators::use_default; R = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; D = boost::iterators::use_default; Derived = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; Base = oqgraph3::in_edge_iterator; Value = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; Traversal = boost::iterators::use_default; Reference = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; Difference = boost::iterators::use_default]’:
/usr/include/boost/iterator/iterator_facade.hpp:567:29:   required from ‘static bool boost::iterators::iterator_core_access::equal(const Facade1&, const Facade2&, mpl_::true_) [with Facade1 = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; Facade2 = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; mpl_::true_ = mpl_::bool_<true>]’
/usr/include/boost/iterator/iterator_facade.hpp:900:3:   required from ‘typename boost::iterators::detail::enable_if_interoperable<Derived1, Derived2, typename boost::mpl::apply2<boost::iterators::detail::always_bool2, Derived1, Derived2>::type>::type boost::iterators::operator!=(const boost::iterators::iterator_facade<Derived1, V1, TC1, Reference1, Difference1>&, const boost::iterators::iterator_facade<Derived2, V2, TC2, Reference2, Difference2>&) [with Derived1 = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; V1 = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; TC1 = boost::iterators::single_pass_traversal_tag; Reference1 = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; Difference1 = long int; Derived2 = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; V2 = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; TC2 = boost::iterators::single_pass_traversal_tag; Reference2 = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; Difference2 = long int; typename boost::iterators::detail::enable_if_interoperable<Derived1, Derived2, typename boost::mpl::apply2<boost::iterators::detail::always_bool2, Derived1, Derived2>::type>::type = bool]’
/usr/include/boost/graph/breadth_first_search.hpp:80:57:   required from ‘void boost::breadth_first_visit(const IncidenceGraph&, SourceIterator, SourceIterator, Buffer&, BFSVisitor, ColorMap) [with IncidenceGraph = boost::reverse_graph<oqgraph3::graph>; Buffer = boost::queue<long long unsigned int>; BFSVisitor = boost::bfs_visitor<std::pair<boost::predecessor_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::on_tree_edge>, std::pair<boost::distance_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> >, boost::on_tree_edge>, open_query::oqgraph_visit_dist<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> > > > > >; ColorMap = boost::two_bit_judy_map<oqgraph3::vertex_index_property_map>; SourceIterator = long long unsigned int*]’
/usr/include/boost/graph/breadth_first_search.hpp:104:24:   required from ‘void boost::breadth_first_visit(const IncidenceGraph&, typename boost::graph_traits<Graph>::vertex_descriptor, Buffer&, BFSVisitor, ColorMap) [with IncidenceGraph = boost::reverse_graph<oqgraph3::graph>; Buffer = boost::queue<long long unsigned int>; BFSVisitor = boost::bfs_visitor<std::pair<boost::predecessor_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::on_tree_edge>, std::pair<boost::distance_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> >, boost::on_tree_edge>, open_query::oqgraph_visit_dist<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> > > > > >; ColorMap = boost::two_bit_judy_map<oqgraph3::vertex_index_property_map>; typename boost::graph_traits<Graph>::vertex_descriptor = long long unsigned int]’
/mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:995:60:   required from here
/usr/include/boost/iterator/iterator_adaptor.hpp:307:29: error: no match for ‘operator==’ (operand types are ‘const oqgraph3::in_edge_iterator’ and ‘const oqgraph3::in_edge_iterator’)
           return m_iterator == x.base();
                             ^
In file included from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28:0,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:161:10: note: candidate: bool oqgraph3::in_edge_iterator::operator==(const self&) <near match>
     bool operator==(const self& x) { return _cursor == x._cursor; }
          ^
/mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:161:10: note:   passing ‘const oqgraph3::in_edge_iterator*’ as ‘this’ argument discards qualifiers
In file included from /usr/include/boost/iterator/iterator_adaptor.hpp:15:0,
                 from /usr/include/boost/iterator/reverse_iterator.hpp:12,
                 from /usr/include/boost/range/reverse_iterator.hpp:21,
                 from /usr/include/boost/range/rbegin.hpp:19,
                 from /usr/include/boost/range/functions.hpp:23,
                 from /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:29,
                 from /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:20,
                 from /usr/include/boost/ptr_container/ptr_deque.hpp:20,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_thunk.h:39,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:27,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/usr/include/boost/iterator/iterator_facade.hpp:899:3: note: candidate: template<class Derived1, class V1, class TC1, class Reference1, class Difference1, class Derived2, class V2, class TC2, class Reference2, class Difference2> typename boost::iterators::detail::enable_if_interoperable<Derived1, Derived2, typename boost::mpl::apply2<boost::iterators::detail::always_bool2, Derived1, Derived2>::type>::type boost::iterators::operator==(const boost::iterators::iterator_facade<Derived1, V1, TC1, Reference1, Difference1>&, const boost::iterators::iterator_facade<Derived2, V2, TC2, Reference2, Difference2>&)
   BOOST_ITERATOR_FACADE_RELATION(==, return, equal)
   ^
/usr/include/boost/iterator/iterator_facade.hpp:899:3: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/iterator/reverse_iterator.hpp:12:0,
                 from /usr/include/boost/range/reverse_iterator.hpp:21,
                 from /usr/include/boost/range/rbegin.hpp:19,
                 from /usr/include/boost/range/functions.hpp:23,
                 from /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:29,
                 from /usr/include/boost/ptr_container/ptr_sequence_adapter.hpp:20,
                 from /usr/include/boost/ptr_container/ptr_deque.hpp:20,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_thunk.h:39,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:27,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/usr/include/boost/iterator/iterator_adaptor.hpp:307:29: note:   ‘const oqgraph3::in_edge_iterator’ is not derived from ‘const boost::iterators::iterator_facade<Derived1, V1, TC1, Reference1, Difference1>’
           return m_iterator == x.base();
                             ^
In file included from /usr/include/boost/graph/reverse_graph.hpp:11:0,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:39:
/usr/include/boost/iterator/transform_iterator.hpp: In instantiation of ‘typename boost::iterators::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type::reference boost::iterators::transform_iterator<UnaryFunction, Iterator, Reference, Value>::dereference() const [with UnaryFunc = boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>; Iterator = oqgraph3::in_edge_iterator; Reference = boost::iterators::use_default; Value = boost::iterators::use_default; typename boost::iterators::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type::reference = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>]’:
/usr/include/boost/iterator/iterator_facade.hpp:549:32:   required from ‘static typename Facade::reference boost::iterators::iterator_core_access::dereference(const Facade&) [with Facade = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; typename Facade::reference = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>]’
/usr/include/boost/iterator/iterator_facade.hpp:655:53:   required from ‘boost::iterators::detail::iterator_facade_base<Derived, Value, CategoryOrTraversal, Reference, Difference, false, false>::reference boost::iterators::detail::iterator_facade_base<Derived, Value, CategoryOrTraversal, Reference, Difference, false, false>::operator*() const [with Derived = boost::iterators::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<oqgraph3::edge_info>, oqgraph3::in_edge_iterator, boost::iterators::use_default, boost::iterators::use_default>; Value = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; CategoryOrTraversal = boost::iterators::single_pass_traversal_tag; Reference = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>; Difference = long int; boost::iterators::detail::iterator_facade_base<Derived, Value, CategoryOrTraversal, Reference, Difference, false, false>::reference = boost::detail::reverse_graph_edge_descriptor<oqgraph3::edge_info>]’
/usr/include/boost/graph/breadth_first_search.hpp:81:27:   required from ‘void boost::breadth_first_visit(const IncidenceGraph&, SourceIterator, SourceIterator, Buffer&, BFSVisitor, ColorMap) [with IncidenceGraph = boost::reverse_graph<oqgraph3::graph>; Buffer = boost::queue<long long unsigned int>; BFSVisitor = boost::bfs_visitor<std::pair<boost::predecessor_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::on_tree_edge>, std::pair<boost::distance_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> >, boost::on_tree_edge>, open_query::oqgraph_visit_dist<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> > > > > >; ColorMap = boost::two_bit_judy_map<oqgraph3::vertex_index_property_map>; SourceIterator = long long unsigned int*]’
/usr/include/boost/graph/breadth_first_search.hpp:104:24:   required from ‘void boost::breadth_first_visit(const IncidenceGraph&, typename boost::graph_traits<Graph>::vertex_descriptor, Buffer&, BFSVisitor, ColorMap) [with IncidenceGraph = boost::reverse_graph<oqgraph3::graph>; Buffer = boost::queue<long long unsigned int>; BFSVisitor = boost::bfs_visitor<std::pair<boost::predecessor_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::on_tree_edge>, std::pair<boost::distance_recorder<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> >, boost::on_tree_edge>, open_query::oqgraph_visit_dist<boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, long long unsigned int> >, boost::associative_property_map<boost::unordered::unordered_map<long long unsigned int, double> > > > > >; ColorMap = boost::two_bit_judy_map<oqgraph3::vertex_index_property_map>; typename boost::graph_traits<Graph>::vertex_descriptor = long long unsigned int]’
/mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:995:60:   required from here
/usr/include/boost/iterator/transform_iterator.hpp:122:18: error: no match for ‘operator*’ (operand type is ‘const oqgraph3::in_edge_iterator’)
     { return m_f(*this->base()); }
                  ^
In file included from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28:0,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:157:16: note: candidate: oqgraph3::in_edge_iterator::value_type oqgraph3::in_edge_iterator::operator*() <near match>
     value_type operator*() { return value_type(_cursor); }
                ^
/mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:157:16: note:   passing ‘const oqgraph3::in_edge_iterator*’ as ‘this’ argument discards qualifiers
In file included from /usr/include/boost/property_map/property_map.hpp:20:0,
                 from /usr/include/boost/graph/adjacency_list.hpp:36,
                 from /usr/include/boost/graph/directed_graph.hpp:10,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:33,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/usr/include/boost/concept_archetype.hpp:315:3: note: candidate: template<class Base> boost::multipliable_archetype<Base> boost::operator*(const boost::multipliable_archetype<Base>&, const boost::multipliable_archetype<Base>&)
   BOOST_DEFINE_OPERATOR_ARCHETYPE(*, multipliable)
   ^
/usr/include/boost/concept_archetype.hpp:315:3: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/graph/reverse_graph.hpp:11:0,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:39:
/usr/include/boost/iterator/transform_iterator.hpp:122:18: note:   ‘const oqgraph3::in_edge_iterator’ is not derived from ‘const boost::multipliable_archetype<Base>’
     { return m_f(*this->base()); }
                  ^
In file included from /usr/include/boost/property_map/property_map.hpp:20:0,
                 from /usr/include/boost/graph/adjacency_list.hpp:36,
                 from /usr/include/boost/graph/directed_graph.hpp:10,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/oqgraph_shim.h:33,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore-graph.h:28,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:29:
/usr/include/boost/concept_archetype.hpp:343:3: note: candidate: template<class Return, class BaseFirst, class BaseSecond> Return boost::operator*(const boost::time_op_first_archetype<Return, BaseFirst>&, const boost::time_op_second_archetype<Return, BaseSecond>&)
   BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(*, time_op)
   ^
/usr/include/boost/concept_archetype.hpp:343:3: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/graph/reverse_graph.hpp:11:0,
                 from /mnt/progs/projects/mariadb/server/storage/oqgraph/graphcore.cc:39:
/usr/include/boost/iterator/transform_iterator.hpp:122:18: note:   ‘const oqgraph3::in_edge_iterator’ is not derived from ‘const boost::time_op_first_archetype<Return, BaseFirst>’
     { return m_f(*this->base()); }
                  ^
storage/oqgraph/CMakeFiles/oqgraph.dir/build.make:86: recipe for target 'storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o' failed
make[2]: *** [storage/oqgraph/CMakeFiles/oqgraph.dir/graphcore.cc.o] Error 1
CMakeFiles/Makefile2:2848: recipe for target 'storage/oqgraph/CMakeFiles/oqgraph.dir/all' failed
make[1]: *** [storage/oqgraph/CMakeFiles/oqgraph.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
Mailing list: https://launchpad.net/~oqgraph-dev
Post to     : oqgraph-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~oqgraph-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to