다음 코드는지도를 const로 operator [] 메서드에 전달하면 한정자가 삭제된다고 말합니다. #include #include #include using namespace std; class MapWrapper { public: const int &get_value(const int &key) const { return _map[key]; } private: map _map; }; int main() { MapWrapper mw; cout