This commit re-adds transitive includes that had been removed by4cd04d1687,c36870c8e7,a83f4b9cda,1458458b55,2e2f3158c6, and489637e66d. This should cover almost all the includes that had been removed since LLVM 14 and that would contribute to breaking user code when releasing LLVM 15. It is possible to disable the inclusion of these headers by defining _LIBCPP_REMOVE_TRANSITIVE_INCLUDES. The intent is that vendors will enable that macro and start fixing downstream issues immediately. We can then remove the macro (and the transitive includes) by default in a future release. That way, we will break users only once by removing transitive includes in bulk instead of doing it bit by bit a every release, which is more disruptive for users. Note 1: The set of headers to re-add was found by re-generating the transitive include test on a checkout of release/14.x, which provided the list of all transitive includes we used to provide. Note 2: Several includes of <vector>, <optional>, <array> and <unordered_map> have been added in this commit. These transitive inclusions were added when we implemented boyer_moore_searcher in <functional>. Note 3: This is a best effort patch to try and resolve downstream breakage caused since branching LLVM 14. I wasn't able to perfectly mirror transitive includes in LLVM 14 for a few headers, so I added a release note explaining it. To summarize, adding boyer_moore_searcher created a bunch of circular dependencies, so we have to break backwards compatibility in a few cases. Differential Revision: https://reviews.llvm.org/D128661
75 lines
2.2 KiB
C++
75 lines
2.2 KiB
C++
// -*- C++ -*-
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
|
|
#define _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
|
|
|
|
/*
|
|
experimental/unordered_map synopsis
|
|
|
|
// C++1z
|
|
namespace std {
|
|
namespace experimental {
|
|
inline namespace fundamentals_v1 {
|
|
namespace pmr {
|
|
|
|
template <class Key, class T,
|
|
class Hash = hash<Key>,
|
|
class Pred = equal_to<Key>>
|
|
using unordered_map =
|
|
std::unordered_map<Key, T, Hash, Pred,
|
|
polymorphic_allocator<pair<const Key,T>>>;
|
|
|
|
template <class Key, class T,
|
|
class Hash = hash<Key>,
|
|
class Pred = equal_to<Key>>
|
|
using unordered_multimap =
|
|
std::unordered_multimap<Key, T, Hash, Pred,
|
|
polymorphic_allocator<pair<const Key,T>>>;
|
|
|
|
} // namespace pmr
|
|
} // namespace fundamentals_v1
|
|
} // namespace experimental
|
|
} // namespace std
|
|
|
|
*/
|
|
|
|
#include <__assert> // all public C++ headers provide the assertion handler
|
|
#include <experimental/__config>
|
|
#include <experimental/memory_resource>
|
|
#include <unordered_map>
|
|
|
|
#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
|
|
# include <algorithm>
|
|
# include <array>
|
|
# include <bit>
|
|
# include <functional>
|
|
# include <vector>
|
|
#endif
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
# pragma GCC system_header
|
|
#endif
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
|
|
|
|
template <class _Key, class _Value,
|
|
class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
|
|
using unordered_map = _VSTD::unordered_map<_Key, _Value, _Hash, _Pred,
|
|
polymorphic_allocator<pair<const _Key, _Value>>>;
|
|
|
|
template <class _Key, class _Value,
|
|
class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
|
|
using unordered_multimap = _VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred,
|
|
polymorphic_allocator<pair<const _Key, _Value>>>;
|
|
|
|
_LIBCPP_END_NAMESPACE_LFTS_PMR
|
|
|
|
#endif /* _LIBCPP_EXPERIMENTAL_UNORDERED_MAP */
|