From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Document that _GLIBCXX_CONCEPT_CHECKS might be removed in future
Date: Wed, 13 Mar 2024 23:52:04 +0000 [thread overview]
Message-ID: <CACb0b4kq7S-wiM+XE683RmLfQZ7jALyc+K6d9RU74=wFBE=hcw@mail.gmail.com> (raw)
In-Reply-To: <20240307120630.482384-1-jwakely@redhat.com>
On Thu, 7 Mar 2024 at 12:07, Jonathan Wakely wrote:
>
> Any objection to this update to make the docs reflect reality?
Pushed to trunk now.
>
> -- >8 --
>
> 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.
> ---
> libstdc++-v3/doc/xml/manual/debug.xml | 2 ++
> libstdc++-v3/doc/xml/manual/extensions.xml | 18 ++++++++++++------
> 2 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/libstdc++-v3/doc/xml/manual/debug.xml b/libstdc++-v3/doc/xml/manual/debug.xml
> index 42d4d32aa29..7f6d0876fc6 100644
> --- a/libstdc++-v3/doc/xml/manual/debug.xml
> +++ b/libstdc++-v3/doc/xml/manual/debug.xml
> @@ -351,6 +351,8 @@
>
> <para> The <link linkend="manual.ext.compile_checks">Compile-Time
> 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>
> </section>
>
> diff --git a/libstdc++-v3/doc/xml/manual/extensions.xml b/libstdc++-v3/doc/xml/manual/extensions.xml
> index d4fe2f509d4..490a50cc331 100644
> --- a/libstdc++-v3/doc/xml/manual/extensions.xml
> +++ b/libstdc++-v3/doc/xml/manual/extensions.xml
> @@ -77,8 +77,7 @@ extensions, be aware of two things:
> object file. The checks are also cleaner and easier to read and
> understand.
> </para>
> - <para>They are off by default for all versions of GCC from 3.0 to 3.4 (the
> - latest release at the time of writing).
> + <para>They are off by default for all GCC 3.0 and all later versions.
> They can be enabled at configure time with
> <link linkend="manual.intro.setup.configure"><literal>--enable-concept-checks</literal></link>.
> You can enable them on a per-translation-unit basis with
> @@ -89,10 +88,17 @@ extensions, be aware of two things:
> </para>
>
> <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
> - support for template parameter 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.
> + of the old C++03 standard and reject some valid code that meets the relaxed
> + requirements of C++11 and later standards.
> + C++11 was expected to have first-class support for template parameter
> + 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><ranges></filename> header and the new overloads in the
> + <filename><algorithm></filename> header for working with ranges.
> + The old library-simulated concept checks might be removed at a future date.
> </para>
>
> </chapter>
> --
> 2.43.2
>
prev parent reply other threads:[~2024-03-13 23:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 12:05 Jonathan Wakely
2024-03-13 23:52 ` Jonathan Wakely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACb0b4kq7S-wiM+XE683RmLfQZ7jALyc+K6d9RU74=wFBE=hcw@mail.gmail.com' \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).