Skip to content

Commit faef447

Browse files
committed
[libc++] Granularize <functional> includes
Reviewed By: Mordante, #libc Spies: libcxx-commits, miyuki Differential Revision: https://reviews.llvm.org/D123912
1 parent 02eac66 commit faef447

File tree

27 files changed

+50
-16
lines changed

27 files changed

+50
-16
lines changed

libcxx/include/__ranges/join_view.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@
99
#ifndef _LIBCPP___RANGES_JOIN_VIEW_H
1010
#define _LIBCPP___RANGES_JOIN_VIEW_H
1111

12+
#include <__concepts/constructible.h>
13+
#include <__concepts/convertible_to.h>
14+
#include <__concepts/copyable.h>
15+
#include <__concepts/derived_from.h>
16+
#include <__concepts/equality_comparable.h>
1217
#include <__config>
1318
#include <__iterator/concepts.h>
19+
#include <__iterator/iter_move.h>
20+
#include <__iterator/iter_swap.h>
1421
#include <__iterator/iterator_traits.h>
1522
#include <__ranges/access.h>
1623
#include <__ranges/all.h>

libcxx/include/algorithm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ template <class BidirectionalIterator, class Compare>
881881
#include <__debug>
882882
#include <cstddef>
883883
#include <cstring>
884-
#include <functional>
884+
#include <functional> // TODO: Remove this include
885885
#include <initializer_list>
886886
#include <iterator>
887887
#include <memory>

libcxx/include/experimental/coroutine

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ template <class P> struct hash<coroutine_handle<P>>;
4646
*/
4747

4848
#include <__assert> // all public C++ headers provide the assertion handler
49+
#include <__functional/hash.h>
4950
#include <cstddef>
5051
#include <experimental/__config>
51-
#include <functional>
52+
#include <functional> // TODO: Remove this include
5253
#include <memory> // for hash<T*>
5354
#include <new>
5455
#include <type_traits>

libcxx/include/experimental/propagate_const

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,12 @@
108108
*/
109109

110110
#include <__assert> // all public C++ headers provide the assertion handler
111+
#include <__functional/operations.h>
112+
#include <__utility/forward.h>
111113
#include <__utility/move.h>
112114
#include <__utility/swap.h>
113115
#include <experimental/__config>
114-
#include <functional>
116+
#include <functional> // TODO: Remove this include
115117
#include <type_traits>
116118

117119
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

libcxx/include/experimental/simd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,12 @@ public:
650650
*/
651651

652652
#include <__assert> // all public C++ headers provide the assertion handler
653+
#include <__functional/operations.h>
653654
#include <array>
654655
#include <cstddef>
655656
#include <experimental/__config>
656-
#include <functional>
657+
#include <functional> // TODO: Remove this include
658+
#include <tuple>
657659

658660
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
659661
# pragma GCC system_header

libcxx/include/ext/hash_map

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
206206
#include <__hash_table>
207207
#include <algorithm>
208208
#include <ext/__hash>
209-
#include <functional>
209+
#include <functional> // TODO: Remove this include
210210
#include <stdexcept>
211211
#include <type_traits>
212212

libcxx/include/ext/hash_set

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ template <class Value, class Hash, class Pred, class Alloc>
197197
#include <__hash_table>
198198
#include <algorithm>
199199
#include <ext/__hash>
200-
#include <functional>
200+
#include <functional> // TODO: Remove this include
201201

202202
#if defined(__DEPRECATED) && __DEPRECATED
203203
#if defined(_LIBCPP_WARNING)

libcxx/include/map

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
539539
#include <__utility/forward.h>
540540
#include <__utility/swap.h>
541541
#include <compare>
542-
#include <functional>
542+
#include <functional> // TODO: Remove this include
543543
#include <initializer_list>
544544
#include <iterator> // __libcpp_erase_if_container
545545
#include <memory>

libcxx/include/mutex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ template<class Callable, class ...Args>
192192
#include <__threading_support>
193193
#include <__utility/forward.h>
194194
#include <cstdint>
195-
#include <functional>
195+
#include <functional> // TODO: Remove this include
196196
#include <memory>
197197
#ifndef _LIBCPP_CXX03_LANG
198198
# include <tuple>

libcxx/include/numeric

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ template<class T>
147147
#include <__assert> // all public C++ headers provide the assertion handler
148148
#include <__config>
149149
#include <cmath> // for isnormal
150-
#include <functional>
150+
#include <functional> // TODO: Remove this include
151151
#include <iterator>
152152
#include <version>
153153

0 commit comments

Comments
 (0)