Example
class MyMap {
std::map<K,V> m_map;
public:
void myFunc( K const& a, V const& b ) {
// want to use [] operator on the current object.
// something like this->[a] = b;
}
V const& operator[]( K const& key ) const {
//body
}
}
How do I access the MyMap with a given key in the function myFunc() using operator[] ?