2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_FLAT_MAP
11 #define _LIBCPP_FLAT_MAP
14 Header <flat_map> synopsis
16 #include <compare> // see [compare.syn]
17 #include <initializer_list> // see [initializer.list.syn]
20 // [flat.map], class template flat_map
21 template<class Key, class T, class Compare = less<Key>,
22 class KeyContainer = vector<Key>, class MappedContainer = vector<T>>
25 struct sorted_unique_t { explicit sorted_unique_t() = default; };
26 inline constexpr sorted_unique_t sorted_unique{};
28 template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
30 struct uses_allocator<flat_map<Key, T, Compare, KeyContainer, MappedContainer>,
33 // [flat.map.erasure], erasure for flat_map
34 template<class Key, class T, class Compare, class KeyContainer, class MappedContainer,
36 typename flat_map<Key, T, Compare, KeyContainer, MappedContainer>::size_type
37 erase_if(flat_map<Key, T, Compare, KeyContainer, MappedContainer>& c, Predicate pred);
40 #include <__assert> // all public C++ headers provide the assertion handler
42 #include <__flat_map/flat_map.h>
43 #include <__flat_map/sorted_unique.h>
46 // standard required includes
48 #include <initializer_list>
50 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
51 # pragma GCC system_header
54 #endif // _LIBCPP_FLAT_MAP