c++ stl find algo on multimap
<pre><code>std::multimap&lt;size_type,size_type&gt;::iterator it;
std::multimap&lt;size_type,size_type&gt;::iterator itlow = colToRow.lower_bound(cols[i]);
std::multimap&lt;size_type,size_type&gt;::iterator itup = colToRow.upper_bound(cols[i]);

if((it = std::find(itlow,itup,std::pair&lt;size_type,size_type&gt;(cols[i],b))) != itup)
</code></pre>

<p>Why does this keep giving me an error, cols[i] and b are both of size type and when I insert into the multimap, it has no problem of inserting it as a pair, how else can this be done?</p>

<p>Thank you,</p>

<p>The error:</p>

<pre><code>/usr/include/c++/4.3/bits/stl_algo.h: In function '_InputIterator std::__find(_InputIterator, _InputIterator, const _Tp&amp;, std::input_iterator_tag) [with _InputIterator = std::_Rb_tree_iterator&lt;std::pair&lt;const unsigned int, unsigned int&gt; &gt;, _Tp = std::pair&lt;unsigned int, unsigned int&gt;]':
/usr/include/c++/4.3/bits/stl_algo.h:3814:   instantiated from '_IIter std::find(_IIter, _IIter, const _Tp&amp;) [with _IIter = std::_Rb_tree_iterator&lt;std::pair&lt;const unsigned int, unsigned int&gt; &gt;, _Tp = std::pair&lt;unsigned int, unsigned int&gt;]'
SMatrix.cpp:286:   instantiated from here
/usr/include/c++/4.3/bits/stl_algo.h:151: error: no match for 'operator==' in '__first.std::_Rb_tree_iterator&lt;_Tp&gt;::operator* [with _Tp = std::pair&lt;const unsigned int, unsigned int&gt;]() == __val'
</code></pre>
