I am trying to encode an associative container compatible with std :: map. To do this, I need to create an insert method that accepts a new element as std :: pair with the first component of type const. For example: std::pair<const int, int> p.
The problem is that such an object cannot be assigned to another. Therefore, in the internal code of my MapCompatibleContainer, I cannot copy a new pair into a private variable (a std :: vector).
How can I get around this?
thank
source
share