unordered_map 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // -*- C++ -*-
  2. //===------------------------- unordered_map ------------------------------===//
  3. //
  4. // The LLVM Compiler Infrastructure
  5. //
  6. // This file is dual licensed under the MIT and the University of Illinois Open
  7. // Source Licenses. See LICENSE.TXT for details.
  8. //
  9. //===----------------------------------------------------------------------===//
  10. #ifndef _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
  11. #define _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
  12. /*
  13. experimental/unordered_map synopsis
  14. // C++1z
  15. namespace std {
  16. namespace experimental {
  17. inline namespace fundamentals_v1 {
  18. namespace pmr {
  19. template <class Key, class T,
  20. class Hash = hash<Key>,
  21. class Pred = equal_to<Key>>
  22. using unordered_map =
  23. std::unordered_map<Key, T, Hash, Pred,
  24. polymorphic_allocator<pair<const Key,T>>>;
  25. template <class Key, class T,
  26. class Hash = hash<Key>,
  27. class Pred = equal_to<Key>>
  28. using unordered_multimap =
  29. std::unordered_multimap<Key, T, Hash, Pred,
  30. polymorphic_allocator<pair<const Key,T>>>;
  31. } // namespace pmr
  32. } // namespace fundamentals_v1
  33. } // namespace experimental
  34. } // namespace std
  35. */
  36. #include <experimental/__config>
  37. #include <unordered_map>
  38. #include <experimental/memory_resource>
  39. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  40. #pragma GCC system_header
  41. #endif
  42. _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
  43. template <class _Key, class _Value,
  44. class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
  45. using unordered_map = _VSTD::unordered_map<_Key, _Value, _Hash, _Pred,
  46. polymorphic_allocator<pair<const _Key, _Value>>>;
  47. template <class _Key, class _Value,
  48. class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
  49. using unordered_multimap = _VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred,
  50. polymorphic_allocator<pair<const _Key, _Value>>>;
  51. _LIBCPP_END_NAMESPACE_LFTS_PMR
  52. #endif /* _LIBCPP_EXPERIMENTAL_UNORDERED_MAP */