class Test
{
public:
typedef std::map<double, double> MapType;
private:
MapType myMap;
public:
...
const MapType& getMap() const // is this normal????
{
return myMap;
}
};
I would like to use my Map outside of the class Test, can I return the reference or there are some bad cases?