map 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // -*- C++ -*-
  2. //===----------------------------- 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_MAP
  11. #define _LIBCPP_EXPERIMENTAL_MAP
  12. /*
  13. experimental/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, class Compare = less<Key>>
  20. using map = std::map<Key, T, Compare,
  21. polymorphic_allocator<pair<const Key,T>>>;
  22. template <class Key, class T, class Compare = less<Key>>
  23. using multimap = std::multimap<Key, T, Compare,
  24. polymorphic_allocator<pair<const Key,T>>>;
  25. } // namespace pmr
  26. } // namespace fundamentals_v1
  27. } // namespace experimental
  28. } // namespace std
  29. */
  30. #include <experimental/__config>
  31. #include <map>
  32. #include <experimental/memory_resource>
  33. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  34. #pragma GCC system_header
  35. #endif
  36. _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
  37. template <class _Key, class _Value, class _Compare = less<_Key>>
  38. using map = _VSTD::map<_Key, _Value, _Compare,
  39. polymorphic_allocator<pair<const _Key, _Value>>>;
  40. template <class _Key, class _Value, class _Compare = less<_Key>>
  41. using multimap = _VSTD::multimap<_Key, _Value, _Compare,
  42. polymorphic_allocator<pair<const _Key, _Value>>>;
  43. _LIBCPP_END_NAMESPACE_LFTS_PMR
  44. #endif /* _LIBCPP_EXPERIMENTAL_MAP */