This would indeed make the insert easier at the cost of complicating the retrieval. By making the int part of the key the retrieval is trival
m_VariableDestinations.find(std::make_pair(name, intValue));
If I was to move the int out of the pair I found that it increased the difficulty quite a bit.
On Thu, Sep 24, 2009 at 11:38 AM, Anthony Foglia
<AFoglia@princeton.com> wrote:
He can pass a custom less functor class as the third template parameter to the map. Something like:
Is the advantave of using the custom functor over the lambda class the ability to use the insert function correctly? By using the functor the insert, that Nat recommended, would indeed only compare the name value and correctly return true or false regardless of the second parameter. Is this correct?
Ryan