Note that there are some explanatory texts on larger screens.

plurals
  1. POModifying items of boost multi index container
    primarykey
    data
    text
    <pre><code>struct tagEnumdef{}; struct tagName{}; struct tagWidget{}; template&lt; class type &gt; class ParamTags; template&lt;&gt; class ParamTags&lt;int&gt; { public: typedef tagEnumdef tag; }; template&lt;&gt; class ParamTags&lt;QString&gt; { public: typedef tagName tag; }; template&lt;&gt; class ParamTags&lt;QWidget*&gt;{ public: typedef tagWidget tag; }; typedef boost::multi_index::multi_index_container &lt; ParamRegistrationEntry, boost::multi_index::indexed_by &lt; boost::multi_index::ordered_unique&lt; boost::multi_index::tag&lt;tagEnumdef&gt;, BOOST_MULTI_INDEX_CONST_MEM_FUN( ParamRegistrationEntry, int, enumdef ) &gt;, boost::multi_index::ordered_unique&lt; boost::multi_index::tag&lt;tagName&gt;, BOOST_MULTI_INDEX_CONST_MEM_FUN( ParamRegistrationEntry, QString, name ) &gt;, boost::multi_index::ordered_unique&lt; boost::multi_index::tag&lt;tagWidget&gt;, BOOST_MULTI_INDEX_CONST_MEM_FUN( ParamRegistrationEntry, QWidget*, widget ) &gt; &gt; &gt; &gt; ParamRegisterIndexContainer; T t_; // int, QString or QWidget* ParamRegisterIndexContainer* const register_; register_-&gt;modify( register_-&gt;get&lt;ParamTags&lt;T&gt;::tag&gt;().find( t_ ), ... ); // C2664 error C2664: 'bool boost::multi_index::detail::ordered_index&lt;KeyFromValue,Compare,SuperMeta,TagList,Category&gt;::modify&lt;boost::lambda::lambda_functor&lt;T&gt;&gt;(boost::multi_index::detail::bidir_node_iterator&lt;Node&gt;,Modifier)' : cannot convert parameter 1 from 'boost::multi_index::detail::bidir_node_iterator&lt;Node&gt;' to 'boost::multi_index::detail::bidir_node_iterator&lt;Node&gt;' With Node=ordered_index_node&lt;index_node_base&lt;...&gt;&gt; Node=ordered_index_node&lt;ordered_index_node&lt;ordered_index_node&lt;index_node_base&lt;...&gt;&gt; </code></pre> <p>I've stripped down parts which shouldn't matter. Are the 3 ordered_index_node's related to the 3 keys I've defined in the container? I get an iterator from 1 index with get(), but modify() seems to require some sort of combination?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload