fork download
  1. #include <map>
  2.  
  3. template <typename Map>
  4. class RestrictedMap
  5. {
  6. public: // Typedefs
  7. typedef typename Map::key_type KeyType;
  8. typedef typename Map::mapped_type MapType;
  9.  
  10. public: // Methods
  11. // TODO: Write your methods here.
  12. void Add(const KeyType &key, const MapType &map);
  13.  
  14. private: // Members
  15. Map m_map;
  16. };
  17.  
  18. typedef RestrictedMap<std::map<int, int> > StlMap; // TODO: Change your map's key and data type
  19. //typedef RestrictedMap<boost::ptr_map<int, int>> BoostMap; // TODO: Change your map's key and data
  20.  
  21. int main()
  22. {
  23. StlMap stlMap;
  24. // BoostMap boostMap;
  25. }
Success #stdin #stdout 0.01s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty