File iwyu_include_picker.patch of Package include-what-you-use

diff --git a/iwyu_include_picker.cc b/iwyu_include_picker.cc
index 840057f..0f5cb37 100644
--- a/iwyu_include_picker.cc
+++ b/iwyu_include_picker.cc
@@ -75,7 +75,7 @@ struct IncludeMapEntry {      // A POD so we can make the input static
 namespace {
 
 // Listed below are all IWYU's native symbol and include mappings,
-// loosely based on GCC 4.4's libc and libstdc++.
+// loosely based on GCC 7's libc and libstdc++.
 
 // Symbol -> include mappings for GNU libc
 const IncludeMapEntry libc_symbol_map[] = {
@@ -240,7 +240,7 @@ const IncludeMapEntry libstdcpp_symbol_map[] = {
 
 // Private -> public include mappings for GNU libc
 const IncludeMapEntry libc_include_map[] = {
-  // ( cd /usr/include && grep '^ *# *include' {sys/,net/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@    { "<$2>", kPrivate, "<$1>", kPublic },@' | grep bits/ | sort )
+  // ( cd /usr/include && grep '^ *# *include' {sys/,net/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@  { "<$2>", kPrivate, "<$1>", kPublic },@' | grep bits/ | sort )
   // When I saw more than one mapping for these, I typically picked
   // what I thought was the "best" one.
   { "<bits/a.out.h>", kPrivate, "<a.out.h>", kPublic },
@@ -248,6 +248,7 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/byteswap.h>", kPrivate, "<byteswap.h>", kPublic },
   { "<bits/cmathcalls.h>", kPrivate, "<complex.h>", kPublic },
   { "<bits/confname.h>", kPrivate, "<unistd.h>", kPublic },
+  { "<bits/cpu-set.h>", kPrivate, "<sched.h>", kPublic },
   { "<bits/dirent.h>", kPrivate, "<dirent.h>", kPublic },
   { "<bits/dlfcn.h>", kPrivate, "<dlfcn.h>", kPublic },
   { "<bits/elfclass.h>", kPrivate, "<link.h>", kPublic },
@@ -261,9 +262,18 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/fcntl2.h>", kPrivate, "<fcntl.h>", kPublic },
   { "<bits/fenv.h>", kPrivate, "<fenv.h>", kPublic },
   { "<bits/fenvinline.h>", kPrivate, "<fenv.h>", kPublic },
+  { "<bits/floatn.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/flt-eval-method.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/fp-fast.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/fp-logb.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/getopt_core.h>", kPrivate, "<getopt.h>", kPublic },
+  { "<bits/getopt_ext.h>", kPrivate, "<getopt.h>", kPublic },
+  { "<bits/getopt_posix.h>", kPrivate, "<stdio.h>", kPublic },
+  { "<bits/getopt_posix.h>", kPrivate, "<unistd.h>", kPublic },
   { "<bits/huge_val.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/huge_valf.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/huge_vall.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/huge_val_flt128.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/hwcap.h>", kPrivate, "<sys/auxv.h>", kPublic },
   { "<bits/inf.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/inotify.h>", kPrivate, "<sys/inotify.h>", kPublic },
@@ -271,6 +281,7 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/ioctls.h>", kPrivate, "<sys/ioctl.h>", kPublic },
   { "<bits/ipc.h>", kPrivate, "<sys/ipc.h>", kPublic },
   { "<bits/ipctypes.h>", kPrivate, "<sys/ipc.h>", kPublic },
+  { "<bits/iscanonical.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/libio-ldbl.h>", kPrivate, "<libio.h>", kPublic },
   { "<bits/link.h>", kPrivate, "<link.h>", kPublic },
   { "<bits/locale.h>", kPrivate, "<locale.h>", kPublic },
@@ -304,7 +315,9 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/shm.h>", kPrivate, "<sys/shm.h>", kPublic },
   { "<bits/sigaction.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/sigcontext.h>", kPrivate, "<signal.h>", kPublic },
+  { "<bits/sigevent-consts.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/siginfo.h>", kPrivate, "<signal.h>", kPublic },
+  { "<bits/siginfo-consts.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/signum.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/sigset.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/sigstack.h>", kPrivate, "<signal.h>", kPublic },
@@ -313,10 +326,13 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/socket.h>", kPrivate, "<sys/socket.h>", kPublic },
   { "<bits/socket2.h>", kPrivate, "<sys/socket.h>", kPublic },
   { "<bits/socket_type.h>", kPrivate, "<sys/socket.h>", kPublic },
+  { "<bits/ss_flags.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/stab.def>", kPrivate, "<stab.h>", kPublic },
   { "<bits/stat.h>", kPrivate, "<sys/stat.h>", kPublic },
   { "<bits/statfs.h>", kPrivate, "<sys/statfs.h>", kPublic },
   { "<bits/statvfs.h>", kPrivate, "<sys/statvfs.h>", kPublic },
+  { "<bits/stdint-intn.h>", kPrivate, "<stdint.h>", kPublic },
+  { "<bits/stdint-uintn.h>", kPrivate, "<stdint.h>", kPublic },
   { "<bits/stdio-ldbl.h>", kPrivate, "<stdio.h>", kPublic },
   { "<bits/stdio-lock.h>", kPrivate, "<libio.h>", kPublic },
   { "<bits/stdio.h>", kPrivate, "<stdio.h>", kPublic },
@@ -329,6 +345,8 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/string.h>", kPrivate, "<string.h>", kPublic },
   { "<bits/string2.h>", kPrivate, "<string.h>", kPublic },
   { "<bits/string3.h>", kPrivate, "<string.h>", kPublic },
+  { "<bits/string_fortified.h>", kPrivate, "<string.h>", kPublic },
+  { "<bits/strings_fortified.h>", kPrivate, "<strings.h>", kPublic },
   { "<bits/stropts.h>", kPrivate, "<stropts.h>", kPublic },
   { "<bits/sys_errlist.h>", kPrivate, "<stdio.h>", kPublic },
   { "<bits/syscall.h>", kPrivate, "<sys/syscall.h>", kPrivate },
@@ -341,7 +359,11 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/timerfd.h>", kPrivate, "<sys/timerfd.h>", kPublic },
   { "<bits/timex.h>", kPrivate, "<sys/timex.h>", kPublic },
   { "<bits/types.h>", kPrivate, "<sys/types.h>", kPublic },
+  { "<bits/type_traits.h>", kPrivate, "<pcre_stringpiece.h>", kPublic },
+  { "<bits/uintn-identity.h>", kPrivate, "<endian.h>", kPublic },
   { "<bits/uio.h>", kPrivate, "<sys/uio.h>", kPublic },
+  { "<bits/uio-ext.h>", kPrivate, "<sys/uio.h>", kPublic },
+  { "<bits/uio_lim.h>", kPrivate, "<sys/uio.h>", kPublic },
   { "<bits/unistd.h>", kPrivate, "<unistd.h>", kPublic },
   { "<bits/ustat.h>", kPrivate, "<sys/ustat.h>", kPrivate },
   { "<bits/utmp.h>", kPrivate, "<utmp.h>", kPublic },
@@ -352,6 +374,8 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/wchar-ldbl.h>", kPrivate, "<wchar.h>", kPublic },
   { "<bits/wchar.h>", kPrivate, "<wchar.h>", kPublic },
   { "<bits/wchar2.h>", kPrivate, "<wchar.h>", kPublic },
+  { "<bits/wctype-wchar.h>", kPrivate, "<wchar.h>", kPublic },
+  { "<bits/wctype-wchar.h>", kPrivate, "<wctype.h>", kPublic },
   { "<bits/wordsize.h>", kPrivate, "<limits.h>", kPublic },
   { "<bits/xopen_lim.h>", kPrivate, "<limits.h>", kPublic },
   { "<bits/xtitypes.h>", kPrivate, "<stropts.h>", kPublic },
@@ -359,24 +383,33 @@ const IncludeMapEntry libc_include_map[] = {
   // # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
   // or
   // # error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
-  // ( cd /usr/include && grep -R '^ *# *error "Never use\|include' * | perl -nle 'm/<([^>]+).*directly.*<([^>]+)/ && print qq@    { "<$1>", kPrivate, "<$2>", kPublic },@' | sort )
+  // ( cd /usr/include && grep -R '^ *# *error "Never use\|include' * | perl -nle 'm/<([^>]+).*directly.*<([^>]+)/ && print qq@  { "<$1>", kPrivate, "<$2>", kPublic },@' | sort )
   { "<bits/a.out.h>", kPrivate, "<a.out.h>", kPublic },
   { "<bits/byteswap-16.h>", kPrivate, "<byteswap.h>", kPublic },
   { "<bits/byteswap.h>", kPrivate, "<byteswap.h>", kPublic },
   { "<bits/cmathcalls.h>", kPrivate, "<complex.h>", kPublic },
   { "<bits/confname.h>", kPrivate, "<unistd.h>", kPublic },
+  { "<bits/cpu-set.h>", kPrivate, "<sched.h>", kPublic },
   { "<bits/dirent.h>", kPrivate, "<dirent.h>", kPublic },
   { "<bits/dlfcn.h>", kPrivate, "<dlfcn.h>", kPublic },
   { "<bits/elfclass.h>", kPrivate, "<link.h>", kPublic },
   { "<bits/endian.h>", kPrivate, "<endian.h>", kPublic },
   { "<bits/epoll.h>", kPrivate, "<sys/epoll.h>", kPublic },
+  { "<bits/errno.h>", kPrivate, "<errno.h>", kPublic },
+  { "<bits/error.h>", kPrivate, "<error.h>", kPublic },
   { "<bits/eventfd.h>", kPrivate, "<sys/eventfd.h>", kPublic },
   { "<bits/fcntl-linux.h>", kPrivate, "<fcntl.h>", kPublic },
   { "<bits/fcntl.h>", kPrivate, "<fcntl.h>", kPublic },
+  { "<bits/fcntl2.h>", kPrivate, "<fcntl.h>", kPublic },
   { "<bits/fenv.h>", kPrivate, "<fenv.h>", kPublic },
+  { "<bits/flt-eval-method.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/fp-fast.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/fp-logb.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/huge_val.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/huge_valf.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/huge_vall.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/huge_val_flt128.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/hwcap.h>", kPrivate, "<sys/auxv.h>", kPublic },
   { "<bits/in.h>", kPrivate, "<netinet/in.h>", kPublic },
   { "<bits/inf.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/inotify.h>", kPrivate, "<sys/inotify.h>", kPublic },
@@ -384,30 +417,78 @@ const IncludeMapEntry libc_include_map[] = {
   { "<bits/ioctls.h>", kPrivate, "<sys/ioctl.h>", kPublic },
   { "<bits/ipc.h>", kPrivate, "<sys/ipc.h>", kPublic },
   { "<bits/ipctypes.h>", kPrivate, "<sys/ipc.h>", kPublic },
+  { "<bits/iscanonical.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/libio-ldbl.h>", kPrivate, "<libio.h>", kPublic },
+  { "<bits/link.h>", kPrivate, "<link.h>", kPublic },
   { "<bits/locale.h>", kPrivate, "<locale.h>", kPublic },
+  { "<bits/mathcalls.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/math-finite.h>", kPrivate, "<math.h>", kPublic },
-  { "<bits/mathdef.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/mathdef.h>", kPrivate, "<complex.h>", kPublic },
   { "<bits/mathinline.h>", kPrivate, "<math.h>", kPublic },
   { "<bits/mman-linux.h>", kPrivate, "<sys/mman.h>", kPublic },
   { "<bits/mman.h>", kPrivate, "<sys/mman.h>", kPublic },
+  { "<bits/monetary-ldbl.h>", kPrivate, "<monetary.h>", kPublic },
+  { "<bits/mqueue2.h>", kPrivate, "<mqueue.h>", kPublic },
   { "<bits/mqueue.h>", kPrivate, "<mqueue.h>", kPublic },
   { "<bits/msq.h>", kPrivate, "<sys/msg.h>", kPublic },
   { "<bits/nan.h>", kPrivate, "<math.h>", kPublic },
+  { "<bits/netdb.h>", kPrivate, "<netdb.h>", kPublic },
   { "<bits/param.h>", kPrivate, "<sys/param.h>", kPublic },
   { "<bits/poll.h>", kPrivate, "<sys/poll.h>", kPrivate },
-  { "<bits/predefs.h>", kPrivate, "<features.h>", kPublic },
+  { "<bits/poll2.h>", kPrivate, "<sys/poll.h>", kPrivate },
+  { "<bits/printf-ldbl.h>", kPrivate, "<printf.h>", kPublic },
   { "<bits/resource.h>", kPrivate, "<sys/resource.h>", kPublic },
+  { "<bits/sched.h>", kPrivate, "<sched.h>", kPublic },
+  { "<bits/select2.h>", kPrivate, "<sys/select.h>", kPublic },
   { "<bits/select.h>", kPrivate, "<sys/select.h>", kPublic },
   { "<bits/semaphore.h>", kPrivate, "<semaphore.h>", kPublic },
+  { "<bits/sem.h>", kPrivate, "<sys/sem.h>", kPublic },
+  { "<bits/setjmp2.h>", kPrivate, "<setjmp.h>", kPublic },
+  { "<bits/setjmp.h>", kPrivate, "<setjmp.h>", kPublic },
+  { "<bits/shm.h>", kPrivate, "<sys/shm.h>", kPublic },
+  { "<bits/sigaction.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/sigcontext.h>", kPrivate, "<signal.h>", kPublic },
+  { "<bits/sigevent-consts.h>", kPrivate, "<signal.h>", kPublic },
+  { "<bits/siginfo-consts.h>", kPrivate, "<signal.h>", kPublic },
   { "<bits/signalfd.h>", kPrivate, "<sys/signalfd.h>", kPublic },
+  { "<bits/signum-generic.h>", kPrivate, "<signal.h>", kPublic },
+  { "<bits/signum.h>", kPrivate, "<signal.h>", kPublic },
+  { "<bits/socket2.h>", kPrivate, "<sys/socket.h>", kPublic },
+  { "<bits/socket.h>", kPrivate, "<sys/socket.h>", kPublic },
+  { "<bits/socket_type.h>", kPrivate, "<sys/socket.h>", kPublic },
+  { "<bits/statfs.h>", kPrivate, "<sys/statfs.h>", kPublic },
+  { "<bits/stat.h>", kPrivate, "<sys/stat.h>", kPublic },
+  { "<bits/statvfs.h>", kPrivate, "<sys/statvfs.h>", kPublic },
+  { "<bits/stdio2.h>", kPrivate, "<stdio.h>", kPublic },
+  { "<bits/stdio.h>", kPrivate, "<stdio.h>", kPublic },
+  { "<bits/stdio-ldbl.h>", kPrivate, "<stdio.h>", kPublic },
+  { "<bits/stdio_lim.h>", kPrivate, "<stdio.h>", kPublic },
   { "<bits/stdlib-float.h>", kPrivate, "<stdlib.h>", kPublic },
-  { "<bits/string.h>", kPrivate, "<string.h>", kPublic },
-  { "<bits/string2.h>", kPrivate, "<string.h>", kPublic },
-  { "<bits/string3.h>", kPrivate, "<string.h>", kPublic },
+  { "<bits/stdlib.h>", kPrivate, "<stdlib.h>", kPublic },
+  { "<bits/stdlib-ldbl.h>", kPrivate, "<stdlib.h>", kPublic },
+  { "<bits/string_fortified.h>", kPrivate, "<string.h>", kPublic },
+  { "<bits/stropts.h>", kPrivate, "<stropts.h>", kPublic },
   { "<bits/syscall.h>", kPrivate, "<sys/syscall.h>", kPrivate },
+  { "<bits/sys_errlist.h>", kPrivate, "<stdio.h>", kPublic },
+  { "<bits/syslog.h>", kPrivate, "<sys/syslog.h>", kPrivate },
+  { "<bits/syslog-ldbl.h>", kPrivate, "<sys/syslog.h>", kPrivate },
+  { "<bits/sysmacros.h>", kPrivate, "<sys/sysmacros.h>", kPublic },
+  { "<bits/termios.h>", kPrivate, "<termios.h>", kPublic },
   { "<bits/timerfd.h>", kPrivate, "<sys/timerfd.h>", kPublic },
   { "<bits/typesizes.h>", kPrivate, "<sys/types.h>", kPublic },
+  { "<bits/uintn-identity.h>", kPrivate, "<endian.h>", kPublic },
+  { "<bits/uio-ext.h>", kPrivate, "<sys/uio.h>", kPublic },
+  { "<bits/unistd.h>", kPrivate, "<unistd.h>", kPublic },
+  { "<bits/ustat.h>", kPrivate, "<sys/ustat.h>", kPrivate },
+  { "<bits/utmp.h>", kPrivate, "<utmp.h>", kPublic },
+  { "<bits/utmpx.h>", kPrivate, "<utmpx.h>", kPublic },
+  { "<bits/utsname.h>", kPrivate, "<sys/utsname.h>", kPublic },
+  { "<bits/waitflags.h>", kPrivate, "<sys/wait.h>", kPublic },
+  { "<bits/waitstatus.h>", kPrivate, "<sys/wait.h>", kPublic },
+  { "<bits/wchar2.h>", kPrivate, "<wchar.h>", kPublic },
+  { "<bits/wchar-ldbl.h>", kPrivate, "<wchar.h>", kPublic },
+  { "<bits/wctype-wchar.h>", kPrivate, "<wchar.h>", kPublic },
+  { "<bits/xtitypes.h>", kPrivate, "<stropts.h>", kPublic },
   // Top-level #includes that just forward to another file:
   // $ for i in /usr/include/*; do [ -f $i ] && [ `wc -l < $i` = 1 ] && echo $i; done
   // (poll.h, syscall.h, syslog.h, ustat.h, wait.h).
@@ -548,45 +629,86 @@ const char* stdlib_cpp_public_headers[] = {
 
 // Private -> public include mappings for GNU libstdc++
 const IncludeMapEntry libstdcpp_include_map[] = {
-  // ( 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@    { "<$2>", kPrivate, "<$1>", kPublic },@' | grep -e bits/ -e tr1_impl/ | sort -u)
+  // ( cd /usr/include/c++/7 && grep '^ *# *include' {ext/,tr1/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@  { "<$2>", kPrivate, "<$1>", kPublic },@' | 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.
-  { "<bits/algorithmfwd.h>", kPrivate, "<algorithm>", kPublic },
+  { "<bits/allocated_ptr.h>", kPrivate, "<future>", kPublic },
   { "<bits/allocator.h>", kPrivate, "<memory>", kPublic },
+  { "<bits/alloc_traits.h>", kPrivate, "<scoped_allocator>", kPublic },
+  { "<bits/atomic_base.h>", kPrivate, "<atomic>", kPublic },
+  { "<bits/atomic_futex.h>", kPrivate, "<future>", kPublic },
   { "<bits/atomic_word.h>", kPrivate, "<ext/atomicity.h>", kPublic },
   { "<bits/basic_file.h>", kPrivate, "<fstream>", kPublic },
   { "<bits/basic_ios.h>", kPrivate, "<ios>", kPublic },
   { "<bits/basic_string.h>", kPrivate, "<string>", kPublic },
   { "<bits/basic_string.tcc>", kPrivate, "<string>", kPublic },
-  { "<bits/boost_sp_shared_count.h>", kPrivate, "<memory>", kPublic },
-  { "<bits/c++io.h>", kPrivate, "<ext/stdio_sync_filebuf.h>", kPublic },
   { "<bits/c++config.h>", kPrivate, "<cstddef>", kPublic },
   { "<bits/char_traits.h>", kPrivate, "<string>", kPublic },
-  { "<bits/cmath.tcc>", kPrivate, "<cmath>", kPublic },
+  { "<bits/c++io.h>", kPrivate, "<ext/stdio_sync_filebuf.h>", kPublic },
   { "<bits/codecvt.h>", kPrivate, "<fstream>", kPublic },
+  { "<bits/cpp_type_traits.h>", kPrivate, "<type_traits>", kPublic },
+  { "<bits/cxxabi_forced.h>", kPrivate, "<cxxabi.h>", kPublic },
+  { "<bits/cxxabi_init_exception.h>", kPrivate, "<cxxabi.h>", kPublic },
   { "<bits/cxxabi_tweaks.h>", kPrivate, "<cxxabi.h>", kPublic },
   { "<bits/deque.tcc>", kPrivate, "<deque>", kPublic },
+  { "<bits/enable_special_members.h>", kPrivate, "<optional>", kPublic },
+  { "<bits/error_constants.h>", kPrivate, "<system_error>", kPublic },
+  { "<bits/exception.h>", kPrivate, "<exception>", kPublic },
+  { "<bits/exception_ptr.h>", kPrivate, "<exception>", kPublic },
+  { "<bits/forward_list.h>", kPrivate, "<forward_list>", kPublic },
+  { "<bits/forward_list.tcc>", kPrivate, "<forward_list>", kPublic },
   { "<bits/fstream.tcc>", kPrivate, "<fstream>", kPublic },
+  { "<bits/functexcept.h>", kPrivate, "<optional>", kPublic },
+  { "<bits/functexcept.h>", kPrivate, "<variant>", kPublic },
   { "<bits/functional_hash.h>", kPrivate, "<unordered_map>", kPublic },
   { "<bits/gslice.h>", kPrivate, "<valarray>", kPublic },
   { "<bits/gslice_array.h>", kPrivate, "<valarray>", kPublic },
+  { "<bits/gthr.h>", kPrivate, "<thread>", kPublic },
+  { "<bits/hash_bytes.h>", kPrivate, "<typeinfo>", kPublic },
   { "<bits/hashtable.h>", kPrivate, "<unordered_map>", kPublic },
   { "<bits/hashtable.h>", kPrivate, "<unordered_set>", kPublic },
   { "<bits/indirect_array.h>", kPrivate, "<valarray>", kPublic },
+  { "<bits/invoke.h>", kPrivate, "<functional>", kPublic },
   { "<bits/ios_base.h>", kPrivate, "<iostream>", kPublic },
   { "<bits/ios_base.h>", kPrivate, "<ios>", kPublic },
   { "<bits/ios_base.h>", kPrivate, "<iomanip>", kPublic },
+  { "<bits/istream.tcc>", kPrivate, "<istream>", kPublic },
+  { "<bits/list.tcc>", kPrivate, "<list>", kPublic },
   { "<bits/locale_classes.h>", kPrivate, "<locale>", kPublic },
+  { "<bits/locale_conv.h>", kPrivate, "<locale>", kPublic },
   { "<bits/locale_facets.h>", kPrivate, "<locale>", kPublic },
   { "<bits/locale_facets_nonio.h>", kPrivate, "<locale>", kPublic },
   { "<bits/localefwd.h>", kPrivate, "<locale>", kPublic },
   { "<bits/mask_array.h>", kPrivate, "<valarray>", kPublic },
-  { "<bits/ostream.tcc>", kPrivate, "<ostream>", kPublic },
+  { "<bits/move.h>", kPrivate, "<utility>", kPublic },
+  { "<bits/nested_exception.h>", kPrivate, "<exception>", kPublic },
+  { "<bits/opt_random.h>", kPrivate, "<random>", kPublic },
   { "<bits/ostream_insert.h>", kPrivate, "<ostream>", kPublic },
+  { "<bits/ostream.tcc>", kPrivate, "<ostream>", kPublic },
+  { "<bits/parse_numbers.h>", kPrivate, "<chrono>", kPublic },
   { "<bits/postypes.h>", kPrivate, "<iostream>", kPublic },
+  { "<bits/ptr_traits.h>", kPrivate, "<ext/pointer.h>", kPublic },
+  { "<bits/quoted_string.h>", kPrivate, "<iomanip>", kPublic },
+  { "<bits/random.h>", kPrivate, "<random>", kPublic },
+  { "<bits/random.tcc>", kPrivate, "<random>", kPublic },
+  { "<bits/range_access.h>", kPrivate, "<iterator>", kPublic },
+  { "<bits/regex_automaton.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/regex_compiler.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/regex_constants.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/regex_error.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/regex_executor.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/regex.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/regex_scanner.h>", kPrivate, "<regex>", kPublic },
+  { "<bits/shared_ptr_atomic.h>", kPrivate, "<memory>", kPublic },
+  { "<bits/shared_ptr.h>", kPrivate, "<memory>", kPublic },
   { "<bits/slice_array.h>", kPrivate, "<valarray>", kPublic },
+  { "<bits/specfun.h>", kPrivate, "<cmath>", kPublic },
+  { "<bits/sstream.tcc>", kPrivate, "<sstream>", kPublic },
+  { "<bits/std_abs.h>", kPrivate, "<cmath>", kPublic },
+  { "<bits/std_function.h>", kPrivate, "<functional>", kPublic },
+  { "<bits/std_mutex.h>", kPrivate, "<mutex>", kPublic },
   { "<bits/stl_algo.h>", kPrivate, "<algorithm>", kPublic },
   { "<bits/stl_algobase.h>", kPrivate, "<algorithm>", kPublic },
   { "<bits/stl_bvector.h>", kPrivate, "<vector>", kPublic },
@@ -603,7 +725,6 @@ const IncludeMapEntry libstdcpp_include_map[] = {
   { "<bits/stl_multiset.h>", kPrivate, "<set>", kPublic },
   { "<bits/stl_numeric.h>", kPrivate, "<numeric>", kPublic },
   { "<bits/stl_pair.h>", kPrivate, "<utility>", kPublic },
-  { "<bits/stl_pair.h>", kPrivate, "<tr1/utility>", kPublic },
   { "<bits/stl_queue.h>", kPrivate, "<queue>", kPublic },
   { "<bits/stl_raw_storage_iter.h>", kPrivate, "<memory>", kPublic },
   { "<bits/stl_relops.h>", kPrivate, "<utility>", kPublic },
@@ -618,101 +739,85 @@ const IncludeMapEntry libstdcpp_include_map[] = {
   { "<bits/streambuf.tcc>", kPrivate, "<streambuf>", kPublic },
   { "<bits/streambuf_iterator.h>", kPrivate, "<iterator>", kPublic },
   { "<bits/stringfwd.h>", kPrivate, "<string>", kPublic },
+  { "<bits/string_view.tcc>", kPrivate, "<string_view>", kPublic },
+  { "<bits/unique_ptr.h>", kPrivate, "<memory>", kPublic },
+  { "<bits/unordered_map.h>", kPrivate, "<unordered_map>", kPublic },
+  { "<bits/unordered_set.h>", kPrivate, "<unordered_set>", kPublic },
+  { "<bits/uses_allocator.h>", kPrivate, "<memory>", kPublic },
   { "<bits/valarray_after.h>", kPrivate, "<valarray>", kPublic },
   { "<bits/valarray_array.h>", kPrivate, "<valarray>", kPublic },
   { "<bits/valarray_before.h>", kPrivate, "<valarray>", kPublic },
   { "<bits/vector.tcc>", kPrivate, "<vector>", kPublic },
-  { "<tr1_impl/array>", kPrivate, "<array>", kPublic },
-  { "<tr1_impl/array>", kPrivate, "<tr1/array>", kPublic },
-  { "<tr1_impl/boost_shared_ptr.h>", kPrivate, "<memory>", kPublic },
-  { "<tr1_impl/boost_shared_ptr.h>", kPrivate, "<tr1/memory>", kPublic },
-  { "<tr1_impl/boost_sp_counted_base.h>", kPrivate, "<memory>", kPublic },
-  { "<tr1_impl/boost_sp_counted_base.h>", kPrivate, "<tr1/memory>", kPublic },
-  { "<tr1_impl/cctype>", kPrivate, "<cctype>", kPublic },
-  { "<tr1_impl/cctype>", kPrivate, "<tr1/cctype>", kPublic },
-  { "<tr1_impl/cfenv>", kPrivate, "<cfenv>", kPublic },
-  { "<tr1_impl/cfenv>", kPrivate, "<tr1/cfenv>", kPublic },
-  { "<tr1_impl/cinttypes>", kPrivate, "<cinttypes>", kPublic },
-  { "<tr1_impl/cinttypes>", kPrivate, "<tr1/cinttypes>", kPublic },
-  { "<tr1_impl/cmath>", kPrivate, "<cmath>", kPublic },
-  { "<tr1_impl/cmath>", kPrivate, "<tr1/cmath>", kPublic },
-  { "<tr1_impl/complex>", kPrivate, "<complex>", kPublic },
-  { "<tr1_impl/complex>", kPrivate, "<tr1/complex>", kPublic },
-  { "<tr1_impl/cstdint>", kPrivate, "<cstdint>", kPublic },
-  { "<tr1_impl/cstdint>", kPrivate, "<tr1/cstdint>", kPublic },
-  { "<tr1_impl/cstdio>", kPrivate, "<cstdio>", kPublic },
-  { "<tr1_impl/cstdio>", kPrivate, "<tr1/cstdio>", kPublic },
-  { "<tr1_impl/cstdlib>", kPrivate, "<cstdlib>", kPublic },
-  { "<tr1_impl/cstdlib>", kPrivate, "<tr1/cstdlib>", kPublic },
-  { "<tr1_impl/cwchar>", kPrivate, "<cwchar>", kPublic },
-  { "<tr1_impl/cwchar>", kPrivate, "<tr1/cwchar>", kPublic },
-  { "<tr1_impl/cwctype>", kPrivate, "<cwctype>", kPublic },
-  { "<tr1_impl/cwctype>", kPrivate, "<tr1/cwctype>", kPublic },
-  { "<tr1_impl/functional>", kPrivate, "<functional>", kPublic },
-  { "<tr1_impl/functional>", kPrivate, "<tr1/functional>", kPublic },
-  { "<tr1_impl/random>", kPrivate, "<random>", kPublic },
-  { "<tr1_impl/random>", kPrivate, "<tr1/random>", kPublic },
-  { "<tr1_impl/regex>", kPrivate, "<regex>", kPublic },
-  { "<tr1_impl/regex>", kPrivate, "<tr1/regex>", kPublic },
-  { "<tr1_impl/type_traits>", kPrivate, "<tr1/type_traits>", kPublic },
-  { "<tr1_impl/type_traits>", kPrivate, "<type_traits>", kPublic },
-  { "<tr1_impl/unordered_map>", kPrivate, "<tr1/unordered_map>", kPublic },
-  { "<tr1_impl/unordered_map>", kPrivate, "<unordered_map>", kPublic },
-  { "<tr1_impl/unordered_set>", kPrivate, "<tr1/unordered_set>", kPublic },
-  { "<tr1_impl/unordered_set>", kPrivate, "<unordered_set>", kPublic },
-  { "<tr1_impl/utility>", kPrivate, "<tr1/utility>", kPublic },
-  { "<tr1_impl/utility>", kPrivate, "<utility>", kPublic },
-  // This didn't come from the grep, but seems to be where swap()
-  // is defined?
-  { "<bits/move.h>", kPrivate, "<algorithm>", kPublic },   // for swap<>()
-  // Hash and hashtable-based containers.
-  { "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/functional>", kPublic },
-  { "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/unordered_map>", kPublic },
-  { "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/unordered_set>", kPublic },
-  { "<tr1/functional_hash.h>", kPrivate, "<tr1/functional>", kPublic },
-  { "<tr1/functional_hash.h>", kPrivate, "<tr1/unordered_map>", kPublic },
-  { "<tr1/functional_hash.h>", kPrivate, "<tr1/unordered_set>", kPublic },
-  { "<tr1_impl/hashtable>", kPrivate, "<tr1/unordered_map>", kPublic },
-  { "<tr1_impl/hashtable>", kPrivate, "<tr1/unordered_set>", kPublic },
-  { "<tr1/hashtable.h>", kPrivate, "<tr1/unordered_map>", kPublic },
-  { "<tr1/hashtable.h>", kPrivate, "<tr1/unordered_set>", kPublic },
   // 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@    { "<$2>", kPrivate, "<$1>", kPublic },@' | sort )
+  // ( cd /usr/include/c++/7 && grep -R '^ *# *include.*tcc' * | perl -nle 'm/^([^:]+).*[<"]([^>"]+)[>"]/ && print qq@  { "<$2>", kPrivate, "<$1>", kPublic },@' | sort )
   // I had to manually edit some of the entries to say the map-to is private.
   { "<bits/basic_ios.tcc>", kPrivate, "<bits/basic_ios.h>", kPrivate },
   { "<bits/basic_string.tcc>", kPrivate, "<string>", kPublic },
-  { "<bits/cmath.tcc>", kPrivate, "<cmath>", kPublic },
   { "<bits/deque.tcc>", kPrivate, "<deque>", kPublic },
+  { "<bits/forward_list.tcc>", kPrivate, "<forward_list>", kPublic },
   { "<bits/fstream.tcc>", kPrivate, "<fstream>", kPublic },
   { "<bits/istream.tcc>", kPrivate, "<istream>", kPublic },
   { "<bits/list.tcc>", kPrivate, "<list>", kPublic },
-  { "<bits/locale_classes.tcc>", kPrivate, 
+  { "<bits/locale_classes.tcc>", kPrivate,
     "<bits/locale_classes.h>", kPrivate },
   { "<bits/locale_facets.tcc>", kPrivate, "<bits/locale_facets.h>", kPrivate },
   { "<bits/locale_facets_nonio.tcc>", kPrivate,
     "<bits/locale_facets_nonio.h>", kPrivate },
   { "<bits/ostream.tcc>", kPrivate, "<ostream>", kPublic },
+  { "<bits/random.tcc>", kPrivate, "<random>", kPublic },
+  { "<bits/regex_automaton.tcc>", kPrivate,
+    "<bits/regex_automaton.h>", kPrivate },
+  { "<bits/regex_compiler.tcc>", kPrivate,
+    "<bits/regex_compiler.h>", kPrivate },
+  { "<bits/regex_executor.tcc>", kPrivate,
+    "<bits/regex_executor.h>", kPrivate },
+  { "<bits/regex_scanner.tcc>", kPrivate, "<bits/regex_scanner.h>", kPrivate },
+  { "<bits/regex.tcc>", kPrivate, "<bits/regex.h>", kPrivate },
   { "<bits/sstream.tcc>", kPrivate, "<sstream>", kPublic },
   { "<bits/streambuf.tcc>", kPrivate, "<streambuf>", kPublic },
-  { "<bits/valarray_array.tcc>", kPrivate, 
+  { "<bits/string_view.tcc>", kPrivate, "<string_view>", kPublic },
+  { "<bits/valarray_array.tcc>", kPrivate,
     "<bits/valarray_array.h>", kPrivate },
   { "<bits/vector.tcc>", kPrivate, "<vector>", kPublic },
-  { "<debug/safe_iterator.tcc>", kPrivate, "<debug/safe_iterator.h>", kPublic },
+  { "<debug/safe_iterator.tcc>", kPrivate,
+    "<debug/safe_iterator.h>", kPublic },
+  { "<debug/safe_local_iterator.tcc>", kPrivate,
+    "<debug/safe_local_iterator.h>", kPublic },
+  { "<debug/safe_sequence.tcc>", kPrivate, "<debug/safe_sequence.h>", kPublic },
+  { "<debug/safe_unordered_container.tcc>", kPrivate,
+    "<debug/safe_unordered_container.h>", kPublic },
+  { "<experimental/bits/string_view.tcc>", kPrivate,
+    "<experimental/string_view>", kPublic },
+  { "<random.tcc>", kPrivate, "<ext/random>", kPublic },
+  { "<tr1/bessel_function.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/bessel_function.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/beta_function.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/beta_function.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/ell_integral.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/ell_integral.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/exp_integral.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/exp_integral.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/gamma.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/gamma.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/hypergeometric.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/hypergeometric.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/legendre_function.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/legendre_function.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/modified_bessel_func.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/modified_bessel_func.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/poly_hermite.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/poly_hermite.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/poly_laguerre.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/poly_laguerre.tcc>", kPrivate, "<tr1/cmath>", kPublic },
+  { "<tr1/random.tcc>", kPrivate, "<tr1/random>", kPublic },
+  { "<tr1/riemann_zeta.tcc>", kPrivate, "<bits/specfun.h>", kPrivate },
   { "<tr1/riemann_zeta.tcc>", kPrivate, "<tr1/cmath>", kPublic },
-  { "<tr1_impl/random.tcc>", kPrivate, "<tr1_impl/random>", kPrivate },
+  { "<tr2/bool_set.tcc>", kPrivate, "<tr2/bool_set>", kPublic },
+  { "<tr2/dynamic_bitset.tcc>", kPrivate, "<tr2/dynamic_bitset>", kPublic },
+  { "<vstring.tcc>", kPrivate, "<ext/vstring.h>", kPublic },
   // 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@  { "<$2>", kPrivate, "<$1>", kPrivate },@' | grep bits/ | sort -u)
+  // ( cd /usr/include/c++/7 && grep '^ *# *include.*bits/' bits/* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@  { "<$2>", kPrivate, "<$1>", kPrivate },@' | grep bits/ | sort -u)
   // and carefully picked reasonable-looking results (algorithm
   // *uses* pair but doesn't *re-export* pair, for instance).
   { "<bits/boost_concept_check.h>", kPrivate,
@@ -751,14 +856,19 @@ const IncludeMapEntry libstdcpp_include_map[] = {
   { "<hash_fun.h>", kPrivate, "<hash_set>", kPublic },
   { "<hashtable.h>", kPrivate, "<hash_map>", kPublic },
   { "<hashtable.h>", kPrivate, "<hash_set>", kPublic },
-  // (This one should perhaps be found automatically somehow.)
+  // (These should perhaps be found automatically somehow.)
+  { "<ext/alloc_traits.h>", kPrivate, "<memory>", kPublic },
+  { "<ext/alloc_traits.h>", kPrivate, "<string>", kPublic },
+  { "<ext/alloc_traits.h>", kPrivate, "<vector>", kPublic },
+  { "<ext/alloc_traits.h>", kPrivate, "<map>", kPublic },
+  { "<ext/alloc_traits.h>", kPrivate, "<set>", kPublic },
   { "<ext/sso_string_base.h>", kPrivate, "<string>", kPublic },
   // 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@    { "<$2>", kPublic, "<$1>", kPublic },@' | sort -u )
+  // ( cd /usr/include/c++/7 && egrep '^ *# *include <(istream|ostream|iostream|fstream|sstream|streambuf|ios|iosfwd)>' *stream* ios | perl -nle 'm/^([^:]+).*[<"]([^>"]+)[>"]/ and print qq@  { "<$2>", kPublic, "<$1>", kPublic },@' | sort -u )
   { "<ios>", kPublic, "<istream>", kPublic },
   { "<ios>", kPublic, "<ostream>", kPublic },
   { "<iosfwd>", kPublic, "<ios>", kPublic },
openSUSE Build Service is sponsored by