unordered_map 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
  10. #define _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
  11. /*
  12. experimental/unordered_map synopsis
  13. // C++1z
  14. namespace std {
  15. namespace experimental {
  16. inline namespace fundamentals_v1 {
  17. namespace pmr {
  18. template <class Key, class T,
  19. class Hash = hash<Key>,
  20. class Pred = equal_to<Key>>
  21. using unordered_map =
  22. std::unordered_map<Key, T, Hash, Pred,
  23. polymorphic_allocator<pair<const Key,T>>>;
  24. template <class Key, class T,
  25. class Hash = hash<Key>,
  26. class Pred = equal_to<Key>>
  27. using unordered_multimap =
  28. std::unordered_multimap<Key, T, Hash, Pred,
  29. polymorphic_allocator<pair<const Key,T>>>;
  30. } // namespace pmr
  31. } // namespace fundamentals_v1
  32. } // namespace experimental
  33. } // namespace std
  34. */
  35. #include <experimental/__config>
  36. #include <experimental/memory_resource>
  37. #include <unordered_map>
  38. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  39. # pragma GCC system_header
  40. #endif
  41. _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
  42. template <class _Key, class _Value,
  43. class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
  44. using unordered_map = _VSTD::unordered_map<_Key, _Value, _Hash, _Pred,
  45. polymorphic_allocator<pair<const _Key, _Value>>>;
  46. template <class _Key, class _Value,
  47. class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
  48. using unordered_multimap = _VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred,
  49. polymorphic_allocator<pair<const _Key, _Value>>>;
  50. _LIBCPP_END_NAMESPACE_LFTS_PMR
  51. #endif /* _LIBCPP_EXPERIMENTAL_UNORDERED_MAP */