On Thu, Sep 24, 2009 at 11:38 AM, Anthony Foglia
Or, even easier, make the key just the string and the value a pair of the int and the vector of classA:
On Thu, Sep 24, 2009 at 12:01 PM, Nat Goodspeed
Yes, that's what I was thinking: migrate the int from the key to the mapped_type.
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
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