Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <unordered_map>
  2. #include <string>
  3. enum Bubu{
  4.     BUBU1,
  5.     BUBU2
  6. };
  7.  
  8. struct BubuHasher{
  9.     size_t operator() (Bubu a) const
  10.     {
  11.         return static_cast<size_t>(a);
  12.     }
  13. };
  14. static const std::unordered_map<Bubu, std::string, BubuHasher> bubu = { {Bubu::BUBU1, "2"}, {Bubu::BUBU2, "4"}};
  15. int main()
  16. {
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement