Wrap all STL includes to support drv:: and eng::

This commit is contained in:
2022-02-23 23:08:28 -05:00
parent f2ab8d9e34
commit acc00289fb
63 changed files with 552 additions and 237 deletions

View File

@@ -0,0 +1,29 @@
#ifndef WRAP_UNORDERED_MAP_HPP
#define WRAP_UNORDERED_MAP_HPP
#include "two-mallocs.hpp"
#include <unordered_map>
namespace eng {
template<class T>
using hash = std::hash<T>;
template<class T>
using equal_to = std::equal_to<T>;
template<class A, class B>
using pair = std::pair<A, B>;
template<class K, class V, class H=std::hash<K>, class E=std::equal_to<K>>
using unordered_map = std::unordered_map<K, V, H, E, EngAllocator<std::pair<const K, V>>>;
} // namespace eng
namespace drv {
template<class T>
using hash = std::hash<T>;
template<class T>
using equal_to = std::equal_to<T>;
template<class A, class B>
using pair = std::pair<A, B>;
template<class K, class V, class H=std::hash<K>, class E=std::equal_to<K>>
using unordered_map = std::unordered_map<K, V, H, E, std::allocator<std::pair<const K, V>>>;
} // namespace drv
#endif // WRAP_UNORDERED_MAP_HPP