Add <bit> and <version> to freestanding headers
authorJonathan Wakely <jwakely@redhat.com>
Mon, 13 Aug 2018 18:54:34 +0000 (19:54 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 13 Aug 2018 18:54:34 +0000 (19:54 +0100)
* include/Makefile.am: Install <bit> and <version> for freestanding.
* include/Makefile.in: Regenerate.
* testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.

From-SVN: r263514

libstdc++-v3/ChangeLog
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/testsuite/17_intro/freestanding.cc

index 424281ce94977ba60ed6a57993a267f837379477..2a785c38916a54d62960d65713f97d40934272f6 100644 (file)
@@ -1,5 +1,9 @@
 2018-08-13  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/Makefile.am: Install <bit> and <version> for freestanding.
+       * include/Makefile.in: Regenerate.
+       * testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.
+
        Revert
        2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
index 70db3cb6260172d0e1f8d5ce63f5e5bec167d938..271695806ffaee4a867a41b24aeabd235499e046 100644 (file)
@@ -1359,10 +1359,10 @@ install-data-local: install-freestanding-headers
 endif
 
 # This is a subset of the full install-headers rule.  We only need <ciso646>,
-# <cstddef>, <cfloat>, <limits>, <climits>, <cstdint>, <cstdlib>, <new>,
-# <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
-# <cstdbool>, <type_traits>, <atomic>, and any files which they include (and
-# which we provide).
+# <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>,
+# <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
+# <cstdbool>, <type_traits>, <bit>, <atomic>, and any files which they include
+# (and which we provide).
 # <new>, <typeinfo>, <exception>, and <initializer_list> are installed by
 # libsupc++, so only the others and the sub-includes are copied here.
 install-freestanding-headers:
@@ -1375,7 +1375,7 @@ install-freestanding-headers:
          ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \
          $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done
        $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
-       for file in limits type_traits atomic; do \
+       for file in limits type_traits atomic bit version; do \
          $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done
        $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
        for file in ciso646 cstddef cfloat climits cstdint cstdlib \
index 0e1cbe489d7b95ffbc01859d5db8481a707189c6..97f738a96a62bbe1741aef4cb9deb2e57eb0dc20 100644 (file)
@@ -1781,10 +1781,10 @@ ${pch3_output}: ${pch3_source} ${pch2_output}
 @GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers
 
 # This is a subset of the full install-headers rule.  We only need <ciso646>,
-# <cstddef>, <cfloat>, <limits>, <climits>, <cstdint>, <cstdlib>, <new>,
-# <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
-# <cstdbool>, <type_traits>, <atomic>, and any files which they include (and
-# which we provide).
+# <cstddef>, <cfloat>, <limits>, <climits>, <version>, <cstdint>, <cstdlib>,
+# <new>, <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
+# <cstdbool>, <type_traits>, <bit>, <atomic>, and any files which they include
+# (and which we provide).
 # <new>, <typeinfo>, <exception>, and <initializer_list> are installed by
 # libsupc++, so only the others and the sub-includes are copied here.
 install-freestanding-headers:
@@ -1797,7 +1797,7 @@ install-freestanding-headers:
          ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \
          $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done
        $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
-       for file in limits type_traits atomic; do \
+       for file in limits type_traits atomic bit version; do \
          $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done
        $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
        for file in ciso646 cstddef cfloat climits cstdint cstdlib \
index e5126ce59266911446bdf35e7f275772b708fd09..4c8498707c49134cce1562cff165b61e2e0f356d 100644 (file)
 #include <initializer_list>
 #include <type_traits>
 
+// C++2a headers:
+#include <bit>
+#include <version>
+
 int main()
 {
   std::exception e;
@@ -47,5 +51,10 @@ int main()
 
   std::initializer_list<int> ilisti __attribute__((unused));
 
+#if __cplusplus > 201703L
+  static_assert( std::ispow2(256u) );
+  static_assert( __cpp_lib_void_t >= 201411L );
+#endif
+
   return 0;
 }