Skip to content
Snippets Groups Projects
Commit d6490157 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Document that _GLIBCXX_CONCEPT_CHECKS might be removed in future

The macro-based concept checks are unmaintained and do not support C++11
or later, so reject valid code. If nobody plans to update them we should
consider removing them. Alternatively, we could ignore the macro for
C++11 and later, so they have no effect and don't reject valid code.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/debug.xml: Document that concept checking might
	be removed in future.
	* doc/xml/manual/extensions.xml: Likewise.
parent 11caf47b
No related branches found
No related tags found
No related merge requests found
...@@ -351,6 +351,8 @@ ...@@ -351,6 +351,8 @@
<para> The <link linkend="manual.ext.compile_checks">Compile-Time <para> The <link linkend="manual.ext.compile_checks">Compile-Time
Checks</link> extension has compile-time checks for many algorithms. Checks</link> extension has compile-time checks for many algorithms.
These checks were designed for C++98 and have not been updated to work
with C++11 and later standards. They might be removed at a future date.
</para> </para>
</section> </section>
......
...@@ -77,8 +77,7 @@ extensions, be aware of two things: ...@@ -77,8 +77,7 @@ extensions, be aware of two things:
object file. The checks are also cleaner and easier to read and object file. The checks are also cleaner and easier to read and
understand. understand.
</para> </para>
<para>They are off by default for all versions of GCC from 3.0 to 3.4 (the <para>They are off by default for all GCC 3.0 and all later versions.
latest release at the time of writing).
They can be enabled at configure time with They can be enabled at configure time with
<link linkend="manual.intro.setup.configure"><literal>--enable-concept-checks</literal></link>. <link linkend="manual.intro.setup.configure"><literal>--enable-concept-checks</literal></link>.
You can enable them on a per-translation-unit basis with You can enable them on a per-translation-unit basis with
...@@ -89,10 +88,17 @@ extensions, be aware of two things: ...@@ -89,10 +88,17 @@ extensions, be aware of two things:
</para> </para>
<para>Please note that the concept checks only validate the requirements <para>Please note that the concept checks only validate the requirements
of the old C++03 standard. C++11 was expected to have first-class of the old C++03 standard and reject some valid code that meets the relaxed
support for template parameter constraints based on concepts in the core requirements of C++11 and later standards.
language. This would have obviated the need for the library-simulated concept C++11 was expected to have first-class support for template parameter
checking described above, but was not part of C++11. constraints based on concepts in the core language.
This would have obviated the need for the library-simulated concept checking
described above, but was not part of C++11.
C++20 adds a different model of concepts, which is now used to constrain
some new parts of the C++20 library, e.g. the
<filename>&lt;ranges&gt;</filename> header and the new overloads in the
<filename>&lt;algorithm&gt;</filename> header for working with ranges.
The old library-simulated concept checks might be removed at a future date.
</para> </para>
</chapter> </chapter>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment