@@ -742,15 +742,16 @@
except for some corner cases. Support for localization
in <classname>locale</classname> may be incomplete on some non-GNU
platforms. Also dependent on the underlying platform is support
- for <type>wchar_t</type> and <type>long
- long</type> specializations, and details of thread support.
+ for <type>wchar_t</type> and <type>long long</type> specializations,
+ and details of thread support.
</para>
<para>
Long answer: See the implementation status pages for
<link linkend="status.iso.1998">C++98</link>,
- <link linkend="status.iso.tr1">TR1</link>, and
- <link linkend="status.iso.2011">C++11</link>.
- <link linkend="status.iso.2014">C++14</link>.
+ <link linkend="status.iso.tr1">TR1</link>,
+ <link linkend="status.iso.2011">C++11</link>,
+ <link linkend="status.iso.2014">C++14</link>, and
+ <link linkend="status.iso.2017">C++17</link>.
</para>
</answer>
</qandaentry>
@@ -891,6 +892,9 @@
</para>
</question>
<answer xml:id="a-ambiguous_overloads">
+ <note>
+ <para>This answer is old and probably no longer be relevant.</para>
+ </note>
<para>
Another problem is the <literal>rel_ops</literal> namespace and the template
comparison operator functions contained therein. If they become
@@ -285,7 +285,19 @@ containers have additional debug capability.
</row>
</thead>
<tbody>
- <row>
+ <row>
+ <entry><classname>std::array</classname></entry>
+ <entry><filename class="headerfile">array</filename></entry>
+ <entry><classname>__gnu_debug::array</classname></entry>
+ <entry><filename class="headerfile"><debug/array></filename></entry>
+ </row>
+ <row>
+ <entry><classname>std::forward_list</classname></entry>
+ <entry><filename class="headerfile">forward_list</filename></entry>
+ <entry><classname>__gnu_debug::forward_list</classname></entry>
+ <entry><filename class="headerfile"><debug/forward_list></filename></entry>
+ </row>
+ <row>
<entry><classname>std::unordered_map</classname></entry>
<entry><filename class="headerfile">unordered_map</filename></entry>
<entry><classname>__gnu_debug::unordered_map</classname></entry>
@@ -1036,7 +1036,7 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
</para>
<para> The <symbol>_GLIBCXX_USE_CXX11_ABI</symbol> macro (see
-<xref linkend="manual.intro.using.macros"/>) controls whether
+ <xref linkend="manual.intro.using.macros"/>) controls whether
the declarations in the library headers use the old or new ABI.
So the decision of which ABI to use can be made separately for each
source file being compiled.
@@ -1071,12 +1071,39 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
</para>
<para> Although the standard exception types defined in
- <filename class="headerfile"><stdexcept></filename> use strings, they
+ <filename class="headerfile"><stdexcept></filename> use strings, most
are not defined twice, so that a <classname>std::out_of_range</classname>
exception thrown in one file can always be caught by a suitable handler in
another file, even if the two files are compiled with different ABIs.
</para>
+<para> One exception type does change when using the new ABI, namely
+ <classname>std::ios_base::failure</classname>.
+ This is necessary because the 2011 standard changed its base class from
+ <classname>std::exception</classname> to
+ <classname>std::system_error</classname>, which causes its layout to change.
+ Exceptions due to iostream errors are thrown by a function inside
+ <filename class="libraryfile">libstdc++.so</filename>, so whether the thrown
+ exception uses the old <classname>std::ios_base::failure</classname> type
+ or the new one depends on the ABI that was active when
+ <filename class="libraryfile">libstdc++.so</filename> was built,
+ <emphasis>not</emphasis> the ABI active in the user code that is using
+ iostreams.
+ This means that for a given build of GCC the type thrown is fixed.
+ In current releases the library throws a special type that can be caught
+ by handlers for either the old or new type,
+ but for GCC 7.1, 7.2 and 7.3 the library throws the new
+ <classname>std::ios_base::failure</classname> type,
+ and for GCC 5.x and 6.x the library throws the old type.
+ Catch handlers of type <classname>std::ios_base::failure</classname>
+ will only catch the exceptions if using a newer release,
+ or if the handler is compiled with the same ABI as the type thrown by
+ the library.
+ Handlers for <classname>std::exception</classname> will always catch
+ iostreams exceptions, because the old and new type both inherit from
+ <classname>std::exception</classname>.
+</para>
+
<section xml:id="manual.intro.using.abi.trouble" xreflabel="Dual ABI Troubleshooting"><info><title>Troubleshooting</title></info>
<para> If you get linker errors about undefined references to symbols