Warning, /include/c++/v1/flat_map is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009
0010 #ifndef _LIBCPP_FLAT_MAP
0011 #define _LIBCPP_FLAT_MAP
0012
0013 /*
0014 Header <flat_map> synopsis
0015
0016 #include <compare> // see [compare.syn]
0017 #include <initializer_list> // see [initializer.list.syn]
0018
0019 namespace std {
0020 // [flat.map], class template flat_map
0021 template<class Key, class T, class Compare = less<Key>,
0022 class KeyContainer = vector<Key>, class MappedContainer = vector<T>>
0023 class flat_map;
0024
0025 struct sorted_unique_t { explicit sorted_unique_t() = default; };
0026 inline constexpr sorted_unique_t sorted_unique{};
0027
0028 template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
0029 class Allocator>
0030 struct uses_allocator<flat_map<Key, T, Compare, KeyContainer, MappedContainer>,
0031 Allocator>;
0032
0033 // [flat.map.erasure], erasure for flat_map
0034 template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
0035 class Predicate>
0036 typename flat_map<Key, T, Compare, KeyContainer, MappedContainer>::size_type
0037 erase_if(flat_map<Key, T, Compare, KeyContainer, MappedContainer>& c, Predicate pred);
0038
0039 // [flat.multimap], class template flat_multimap
0040 template<class Key, class T, class Compare = less<Key>,
0041 class KeyContainer = vector<Key>, class MappedContainer = vector<T>>
0042 class flat_multimap;
0043
0044 struct sorted_equivalent_t { explicit sorted_equivalent_t() = default; };
0045 inline constexpr sorted_equivalent_t sorted_equivalent{};
0046
0047 template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
0048 class Allocator>
0049 struct uses_allocator<flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>,
0050 Allocator>;
0051
0052 // [flat.multimap.erasure], erasure for flat_multimap
0053 template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
0054 class Predicate>
0055 typename flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>::size_type
0056 erase_if(flat_multimap<Key, T, Compare, KeyContainer, MappedContainer>& c, Predicate pred);
0057 */
0058
0059 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0060 # include <__cxx03/__config>
0061 #else
0062 # include <__config>
0063
0064 # if _LIBCPP_STD_VER >= 23
0065 # include <__flat_map/flat_map.h>
0066 # include <__flat_map/flat_multimap.h>
0067 # include <__flat_map/sorted_equivalent.h>
0068 # include <__flat_map/sorted_unique.h>
0069 # endif
0070
0071 // for feature-test macros
0072 # include <version>
0073
0074 // standard required includes
0075 # include <compare>
0076 # include <initializer_list>
0077
0078 # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0079 # pragma GCC system_header
0080 # endif
0081 #endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0082
0083 #endif // _LIBCPP_FLAT_MAP