/usr/share/include-what-you-use/gcc.stl.headers.imp is in iwyu 5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | # GCC STL headers
[
# ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include' {ext/,tr1/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: ["<$2>", private, "<$1>", public ] },@' | grep -e bits/ -e tr1_impl/ | sort -u)
# I removed a lot of 'meaningless' dependencies -- for instance,
# <functional> //includes <bits/stringfwd.h>, but if someone is
# using strings, <functional> isn't enough to satisfy iwyu.
# We may need to add other dirs in future versions of gcc.
{ include: ["<bits/algorithmfwd.h>", private, "<algorithm>", public ] },
{ include: ["<bits/allocator.h>", private, "<memory>", public ] },
{ include: ["<bits/atomic_word.h>", private, "<ext/atomicity.h>", public ] },
{ include: ["<bits/basic_file.h>", private, "<fstream>", public ] },
{ include: ["<bits/basic_ios.h>", private, "<ios>", public ] },
{ include: ["<bits/basic_string.h>", private, "<string>", public ] },
{ include: ["<bits/basic_string.tcc>", private, "<string>", public ] },
{ include: ["<bits/boost_sp_shared_count.h>", private, "<memory>", public ] },
{ include: ["<bits/c++io.h>", private, "<ext/stdio_sync_filebuf.h>", public ] },
{ include: ["<bits/c++config.h>", private, "<cstddef>", public ] },
{ include: ["<bits/char_traits.h>", private, "<string>", public ] },
{ include: ["<bits/cmath.tcc>", private, "<cmath>", public ] },
{ include: ["<bits/codecvt.h>", private, "<fstream>", public ] },
{ include: ["<bits/cxxabi_tweaks.h>", private, "<cxxabi.h>", public ] },
{ include: ["<bits/deque.tcc>", private, "<deque>", public ] },
{ include: ["<bits/fstream.tcc>", private, "<fstream>", public ] },
{ include: ["<bits/functional_hash.h>", private, "<unordered_map>", public ] },
{ include: ["<bits/gslice.h>", private, "<valarray>", public ] },
{ include: ["<bits/gslice_array.h>", private, "<valarray>", public ] },
{ include: ["<bits/hashtable.h>", private, "<unordered_map>", public ] },
{ include: ["<bits/hashtable.h>", private, "<unordered_set>", public ] },
{ include: ["<bits/indirect_array.h>", private, "<valarray>", public ] },
{ include: ["<bits/ios_base.h>", private, "<iostream>", public ] },
{ include: ["<bits/ios_base.h>", private, "<ios>", public ] },
{ include: ["<bits/ios_base.h>", private, "<iomanip>", public ] },
{ include: ["<bits/locale_classes.h>", private, "<locale>", public ] },
{ include: ["<bits/locale_facets.h>", private, "<locale>", public ] },
{ include: ["<bits/locale_facets_nonio.h>", private, "<locale>", public ] },
{ include: ["<bits/localefwd.h>", private, "<locale>", public ] },
{ include: ["<bits/mask_array.h>", private, "<valarray>", public ] },
{ include: ["<bits/ostream.tcc>", private, "<ostream>", public ] },
{ include: ["<bits/ostream_insert.h>", private, "<ostream>", public ] },
{ include: ["<bits/postypes.h>", private, "<iostream>", public ] },
{ include: ["<bits/slice_array.h>", private, "<valarray>", public ] },
{ include: ["<bits/stl_algo.h>", private, "<algorithm>", public ] },
{ include: ["<bits/stl_algobase.h>", private, "<algorithm>", public ] },
{ include: ["<bits/stl_bvector.h>", private, "<vector>", public ] },
{ include: ["<bits/stl_construct.h>", private, "<memory>", public ] },
{ include: ["<bits/stl_deque.h>", private, "<deque>", public ] },
{ include: ["<bits/stl_function.h>", private, "<functional>", public ] },
{ include: ["<bits/stl_heap.h>", private, "<queue>", public ] },
{ include: ["<bits/stl_iterator.h>", private, "<iterator>", public ] },
{ include: ["<bits/stl_iterator_base_funcs.h>", private, "<iterator>", public ] },
{ include: ["<bits/stl_iterator_base_types.h>", private, "<iterator>", public ] },
{ include: ["<bits/stl_list.h>", private, "<list>", public ] },
{ include: ["<bits/stl_map.h>", private, "<map>", public ] },
{ include: ["<bits/stl_multimap.h>", private, "<map>", public ] },
{ include: ["<bits/stl_multiset.h>", private, "<set>", public ] },
{ include: ["<bits/stl_numeric.h>", private, "<numeric>", public ] },
{ include: ["<bits/stl_pair.h>", private, "<utility>", public ] },
{ include: ["<bits/stl_pair.h>", private, "<tr1/utility>", public ] },
{ include: ["<bits/stl_queue.h>", private, "<queue>", public ] },
{ include: ["<bits/stl_raw_storage_iter.h>", private, "<memory>", public ] },
{ include: ["<bits/stl_relops.h>", private, "<utility>", public ] },
{ include: ["<bits/stl_set.h>", private, "<set>", public ] },
{ include: ["<bits/stl_stack.h>", private, "<stack>", public ] },
{ include: ["<bits/stl_tempbuf.h>", private, "<memory>", public ] },
{ include: ["<bits/stl_tree.h>", private, "<map>", public ] },
{ include: ["<bits/stl_tree.h>", private, "<set>", public ] },
{ include: ["<bits/stl_uninitialized.h>", private, "<memory>", public ] },
{ include: ["<bits/stl_vector.h>", private, "<vector>", public ] },
{ include: ["<bits/stream_iterator.h>", private, "<iterator>", public ] },
{ include: ["<bits/streambuf.tcc>", private, "<streambuf>", public ] },
{ include: ["<bits/streambuf_iterator.h>", private, "<iterator>", public ] },
{ include: ["<bits/stringfwd.h>", private, "<string>", public ] },
{ include: ["<bits/valarray_after.h>", private, "<valarray>", public ] },
{ include: ["<bits/valarray_array.h>", private, "<valarray>", public ] },
{ include: ["<bits/valarray_before.h>", private, "<valarray>", public ] },
{ include: ["<bits/vector.tcc>", private, "<vector>", public ] },
{ include: ["<tr1_impl/array>", private, "<array>", public ] },
{ include: ["<tr1_impl/array>", private, "<tr1/array>", public ] },
{ include: ["<tr1_impl/boost_shared_ptr.h>", private, "<memory>", public ] },
{ include: ["<tr1_impl/boost_shared_ptr.h>", private, "<tr1/memory>", public ] },
{ include: ["<tr1_impl/boost_sp_counted_base.h>", private, "<memory>", public ] },
{ include: ["<tr1_impl/boost_sp_counted_base.h>", private, "<tr1/memory>", public ] },
{ include: ["<tr1_impl/cctype>", private, "<cctype>", public ] },
{ include: ["<tr1_impl/cctype>", private, "<tr1/cctype>", public ] },
{ include: ["<tr1_impl/cfenv>", private, "<cfenv>", public ] },
{ include: ["<tr1_impl/cfenv>", private, "<tr1/cfenv>", public ] },
{ include: ["<tr1_impl/cinttypes>", private, "<cinttypes>", public ] },
{ include: ["<tr1_impl/cinttypes>", private, "<tr1/cinttypes>", public ] },
{ include: ["<tr1_impl/cmath>", private, "<cmath>", public ] },
{ include: ["<tr1_impl/cmath>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1_impl/complex>", private, "<complex>", public ] },
{ include: ["<tr1_impl/complex>", private, "<tr1/complex>", public ] },
{ include: ["<tr1_impl/cstdint>", private, "<cstdint>", public ] },
{ include: ["<tr1_impl/cstdint>", private, "<tr1/cstdint>", public ] },
{ include: ["<tr1_impl/cstdio>", private, "<cstdio>", public ] },
{ include: ["<tr1_impl/cstdio>", private, "<tr1/cstdio>", public ] },
{ include: ["<tr1_impl/cstdlib>", private, "<cstdlib>", public ] },
{ include: ["<tr1_impl/cstdlib>", private, "<tr1/cstdlib>", public ] },
{ include: ["<tr1_impl/cwchar>", private, "<cwchar>", public ] },
{ include: ["<tr1_impl/cwchar>", private, "<tr1/cwchar>", public ] },
{ include: ["<tr1_impl/cwctype>", private, "<cwctype>", public ] },
{ include: ["<tr1_impl/cwctype>", private, "<tr1/cwctype>", public ] },
{ include: ["<tr1_impl/functional>", private, "<functional>", public ] },
{ include: ["<tr1_impl/functional>", private, "<tr1/functional>", public ] },
{ include: ["<tr1_impl/random>", private, "<random>", public ] },
{ include: ["<tr1_impl/random>", private, "<tr1/random>", public ] },
{ include: ["<tr1_impl/regex>", private, "<regex>", public ] },
{ include: ["<tr1_impl/regex>", private, "<tr1/regex>", public ] },
{ include: ["<tr1_impl/type_traits>", private, "<tr1/type_traits>", public ] },
{ include: ["<tr1_impl/type_traits>", private, "<type_traits>", public ] },
{ include: ["<tr1_impl/unordered_map>", private, "<tr1/unordered_map>", public ] },
{ include: ["<tr1_impl/unordered_map>", private, "<unordered_map>", public ] },
{ include: ["<tr1_impl/unordered_set>", private, "<tr1/unordered_set>", public ] },
{ include: ["<tr1_impl/unordered_set>", private, "<unordered_set>", public ] },
{ include: ["<tr1_impl/utility>", private, "<tr1/utility>", public ] },
{ include: ["<tr1_impl/utility>", private, "<utility>", public ] },
# This didn't come from the grep, but seems to be where swap()
# is defined?
{ include: ["<bits/move.h>", private, "<algorithm>", public ] }, # for swap<>()
# Hash and hashtable-based containers.
{ include: ["<tr1_impl/functional_hash.h>", private, "<tr1/functional>", public ] },
{ include: ["<tr1_impl/functional_hash.h>", private, "<tr1/unordered_map>", public ] },
{ include: ["<tr1_impl/functional_hash.h>", private, "<tr1/unordered_set>", public ] },
{ include: ["<tr1/functional_hash.h>", private, "<tr1/functional>", public ] },
{ include: ["<tr1/functional_hash.h>", private, "<tr1/unordered_map>", public ] },
{ include: ["<tr1/functional_hash.h>", private, "<tr1/unordered_set>", public ] },
{ include: ["<tr1_impl/hashtable>", private, "<tr1/unordered_map>", public ] },
{ include: ["<tr1_impl/hashtable>", private, "<tr1/unordered_set>", public ] },
{ include: ["<tr1/hashtable.h>", private, "<tr1/unordered_map>", public ] },
{ include: ["<tr1/hashtable.h>", private, "<tr1/unordered_set>", public ] },
# All .tcc files are gcc internal-include files. We get them from
# ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep -R '^ *# *include.*tcc' * | perl -nle 'm/^([^:]+).*[<"]([^>"]+)[>"]/ && print qq@ { include: ["<$2>", private, "<$1>", public ] },@' | sort )
# I had to manually edit some of the entries to say the map-to is private.
{ include: ["<bits/basic_ios.tcc>", private, "<bits/basic_ios.h>", private ] },
{ include: ["<bits/basic_string.tcc>", private, "<string>", public ] },
{ include: ["<bits/cmath.tcc>", private, "<cmath>", public ] },
{ include: ["<bits/deque.tcc>", private, "<deque>", public ] },
{ include: ["<bits/fstream.tcc>", private, "<fstream>", public ] },
{ include: ["<bits/istream.tcc>", private, "<istream>", public ] },
{ include: ["<bits/list.tcc>", private, "<list>", public ] },
{ include: ["<bits/locale_classes.tcc>", private, "<bits/locale_classes.h>", private ] },
{ include: ["<bits/locale_facets.tcc>", private, "<bits/locale_facets.h>", private ] },
{ include: ["<bits/locale_facets_nonio.tcc>", private,
"<bits/locale_facets_nonio.h>", private ] },
{ include: ["<bits/ostream.tcc>", private, "<ostream>", public ] },
{ include: ["<bits/sstream.tcc>", private, "<sstream>", public ] },
{ include: ["<bits/streambuf.tcc>", private, "<streambuf>", public ] },
{ include: ["<bits/valarray_array.tcc>", private, "<bits/valarray_array.h>", private ] },
{ include: ["<bits/vector.tcc>", private, "<vector>", public ] },
{ include: ["<debug/safe_iterator.tcc>", private, "<debug/safe_iterator.h>", public ] },
{ include: ["<tr1/bessel_function.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/beta_function.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/ell_integral.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/exp_integral.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/gamma.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/hypergeometric.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/legendre_function.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/modified_bessel_func.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/poly_hermite.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/poly_laguerre.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1/riemann_zeta.tcc>", private, "<tr1/cmath>", public ] },
{ include: ["<tr1_impl/random.tcc>", private, "<tr1_impl/random>", private ] },
# Some bits->bits //includes: A few files in bits re-export
# symbols from other files in bits.
# ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && grep '^ *# *include.*bits/' bits/* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { include: ["<$2>", private, "<$1>", private ] },@' | grep bits/ | sort -u)
# and carefully picked reasonable-looking results (algorithm
# *uses* pair but doesn't *re-export* pair, for instance).
{ include: ["<bits/boost_concept_check.h>", private,
"<bits/concept_check.h>", private ] },
{ include: ["<bits/c++allocator.h>", private, "<bits/allocator.h>", private ] },
{ include: ["<bits/codecvt.h>", private, "<bits/locale_facets_nonio.h>", private ] },
{ include: ["<bits/ctype_base.h>", private, "<bits/locale_facets.h>", private ] },
{ include: ["<bits/ctype_inline.h>", private, "<bits/locale_facets.h>", private ] },
{ include: ["<bits/functexcept.h>", private, "<bits/stl_algobase.h>", private ] },
{ include: ["<bits/locale_classes.h>", private, "<bits/basic_ios.h>", private ] },
{ include: ["<bits/locale_facets.h>", private, "<bits/basic_ios.h>", private ] },
{ include: ["<bits/messages_members.h>", private,
"<bits/locale_facets_nonio.h>", private ] },
{ include: ["<bits/postypes.h>", private, "<bits/char_traits.h>", private ] },
{ include: ["<bits/slice_array.h>", private, "<bits/valarray_before.h>", private ] },
{ include: ["<bits/stl_construct.h>", private, "<bits/stl_tempbuf.h>", private ] },
{ include: ["<bits/stl_move.h>", private, "<bits/stl_algobase.h>", private ] },
{ include: ["<bits/stl_uninitialized.h>", private, "<bits/stl_tempbuf.h>", private ] },
{ include: ["<bits/stl_vector.h>", private, "<bits/stl_bvector.h>", private ] },
{ include: ["<bits/streambuf_iterator.h>", private, "<bits/basic_ios.h>", private ] },
# I don't think we want to be having people move to 'backward/'
# yet. (These hold deprecated STL classes that we still use
# actively.) These are the ones that turned up in an analysis of
{ include: ["<backward/auto_ptr.h>", private, "<memory>", public ] },
{ include: ["<backward/binders.h>", private, "<functional>", public ] },
{ include: ["<backward/hash_fun.h>", private, "<hash_map>", public ] },
{ include: ["<backward/hash_fun.h>", private, "<hash_set>", public ] },
{ include: ["<backward/hashtable.h>", private, "<hash_map>", public ] },
{ include: ["<backward/hashtable.h>", private, "<hash_set>", public ] },
{ include: ["<backward/strstream>", private, "<strstream>", public ] },
# We have backward as part of the -I search path now, so have the
# non-backwards-prefix version as well.
{ include: ["<auto_ptr.h>", private, "<memory>", public ] },
{ include: ["<binders.h>", private, "<functional>", public ] },
{ include: ["<hash_fun.h>", private, "<hash_map>", public ] },
{ include: ["<hash_fun.h>", private, "<hash_set>", public ] },
{ include: ["<hashtable.h>", private, "<hash_map>", public ] },
{ include: ["<hashtable.h>", private, "<hash_set>", public ] },
# (This one should perhaps be found automatically somehow.)
{ include: ["<ext/sso_string_base.h>", private, "<string>", public ] },
# The iostream .h files are confusing. Lots of private headers,
# which are handled above, but we also have public headers
# #including each other (eg <iostream> //includes <istream>). We
# are pretty forgiving: if a user specifies any public header, we
# generally don't require the others.
# ( cd /usr/crosstool/v12/gcc-4.3.1-glibc-2.3.6-grte/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/4.3.1 && egrep '^ *# *include <(istream|ostream|iostream|fstream|sstream|streambuf|ios|iosfwd)>' *stream* ios | perl -nle 'm/^([^:]+).*[<"]([^>"]+)[>"]/ and print qq@ { include: ["<$2>", public, "<$1>", public ] },@' | sort -u )
{ include: ["<ios>", public, "<istream>", public ] },
{ include: ["<ios>", public, "<ostream>", public ] },
{ include: ["<iosfwd>", public, "<ios>", public ] },
{ include: ["<iosfwd>", public, "<streambuf>", public ] },
{ include: ["<istream>", public, "<fstream>", public ] },
{ include: ["<istream>", public, "<iostream>", public ] },
{ include: ["<istream>", public, "<sstream>", public ] },
{ include: ["<ostream>", public, "<fstream>", public ] },
{ include: ["<ostream>", public, "<iostream>", public ] },
{ include: ["<ostream>", public, "<istream>", public ] },
{ include: ["<ostream>", public, "<sstream>", public ] },
{ include: ["<streambuf>", public, "<ios>", public ] },
# The location of exception_defines.h varies by GCC version. It should
# never be included directly.
{ include: ["<bits/exception_defines.h>", private, "<exception>", public ] },
{ include: ["<exception_defines.h>", private, "<exception>", public ] },
]
|