map 1.7 KB

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