commit 611da69f7782376d2737fe683f5db7ea7a5cdb31 Author: Jonathan Wakely Date: Thu Nov 26 11:31:02 2020 +0000 Document libstdc++ header dependency changes Also explain how to replace dynamic exception specifications. diff --git a/htdocs/gcc-11/porting_to.html b/htdocs/gcc-11/porting_to.html index 1e27064c..91cd0b4d 100644 --- a/htdocs/gcc-11/porting_to.html +++ b/htdocs/gcc-11/porting_to.html @@ -77,10 +77,43 @@ equality comparisons, not ordered comparisons.

GCC 11 defaults to C++17 which does not allow dynamic exception specifications.

+

+An exception specification like throw(std::runtime_error) should +be removed or replaced with noexcept(false) (meaning the function +can throw any type of exception). +An exception specification like throw() can be replaced with +noexcept or noexcept(true) (meaning the function +does not throw exceptions). +

Comparison Functions

GCC 11 now enforces that comparison objects be invocable as const. +

+ +

Header dependency changes

+

Some C++ Standard Library headers have been changed to no longer include +other headers that they do need to depend on. +As such, C++ programs that used standard library components without +including the right headers will no longer compiler. +

+

+The following headers are used less widely in libstdc++ and may need to +be included explicitly by programs that were incorrectly relying on them +being included implicitly by other headers: +

+