map 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 <__assert> // all public C++ headers provide the assertion handler
  30. #include <experimental/__config>
  31. #include <experimental/memory_resource>
  32. #include <map>
  33. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  34. # pragma GCC system_header
  35. #endif
  36. _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
  37. #ifndef _LIBCPP_CXX03_LANG
  38. template <class _Key, class _Value, class _Compare = less<_Key>>
  39. using map = _VSTD::map<_Key, _Value, _Compare,
  40. polymorphic_allocator<pair<const _Key, _Value>>>;
  41. template <class _Key, class _Value, class _Compare = less<_Key>>
  42. using multimap = _VSTD::multimap<_Key, _Value, _Compare,
  43. polymorphic_allocator<pair<const _Key, _Value>>>;
  44. #endif // _LIBCPP_CXX03_LANG
  45. _LIBCPP_END_NAMESPACE_LFTS_PMR
  46. #endif /* _LIBCPP_EXPERIMENTAL_MAP */