Last active
December 19, 2015 11:28
-
-
Save bastih/5947369 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _LIBCPP_VERSION | |
template < | |
typename kT, | |
typename vT, | |
typename comp=typename std::map<kT, vT>::key_compare, | |
typename alloc=alloc_adapter<typename std::map<kT, vT>::value_type> | |
> | |
using map = std::map<kT, vT, comp, alloc>; | |
#else | |
//c++11-ify map re allocation | |
template< | |
class Key, | |
class T, | |
typename Compare=typename std::map<Key, T>::key_compare, | |
typename Allocator=alloc_adapter<typename std::map<Key, T>::value_type> | |
> | |
class map : public std::map<Key, T, Compare, Allocator> { | |
public: | |
inline explicit map(const Allocator& alloc) : std::map<Key, T, Compare, Allocator>(Compare(), alloc) {} | |
}; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment