I have not worked with c++ in a few years and am struggling with implementing a boost multi_index container. I've generated a toy that demonstrates my problem here: http://cpp.sh/6q4nb.
Essentially, I'm searching for an element using find() and then testing if that element is found or not using operator==. The search I'm doing is using index tagging as explained in the boost documentation. If it is required that I generate an operator== for this container, can someone demonstrate how to do so as I can't find a clear example in the documentation?
The error I get is:
57:14: error: no match for 'operator==' (operand types are 'volatile boost::multi_index::detail::bidir_node_iterator > > >' and 'boost::multi_index::detail::ordered_index&, &Placeholder::getPlaceholderId>, std::less >, boost::multi_index::detail::nth_layer<3, Placeholder, boost::multi_index::indexed_by >, boost::multi_index::ordered_non_unique >, boost::multi_index::ordered_non_unique, boost::multi_index::const_mem_fun&, &Placeholder::getPlaceholderId> > >, std::allocator >, boost::mpl::v_item, 0>, boost::multi_index::detail::ordered_non_unique_tag>::iterator {aka boost::multi_index::detail::bidir_node_iterator > > >}')
Followed by the usual long list of candidates due to c++ template options.
Aucun commentaire:
Enregistrer un commentaire