fork(2) download
  1. #include <iostream>
  2. #include <map>
  3. using namespace std;
  4.  
  5. template<class K, class V> using map_item = typename std::map<K,V>::value_type;
  6.  
  7. template<template<class> class A, class K, class V, class C = std::less<K>>
  8. using customized_map = std::map<K, V, C, A<map_item<K,V>>>;
  9.  
  10. template<class E> using my_allocator = std::allocator<E>;
  11.  
  12. template<class K, class V, class C = std::less<K>>
  13. using my_map = customized_map<my_allocator, K, V, C>;
  14.  
  15. using the_map = my_map<int,char>;
  16. using eth_map = my_map<int,char,std::greater<int>>;
  17.  
  18. int main() {
  19. eth_map m;
  20. m[1] = 2;
  21. // your code goes here
  22. return 0;
  23. }
Success #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty