From patchwork Thu Mar 7 12:05:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1909223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=D4REnUtH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tr7MN1lv6z1yX3 for ; Thu, 7 Mar 2024 23:06:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CAEB13857C4A for ; Thu, 7 Mar 2024 12:06:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 408F23858D35 for ; Thu, 7 Mar 2024 12:06:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 408F23858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 408F23858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709813195; cv=none; b=Yf/f7E81CcxDHH279CH0C8vfOx02FRCNZhBrJe0Erj8k9ykN4Q3amKXhVzDZ49rUcojpi/4u9VjAUswmvSzw7aA1ALAE5Q301FqnKRpG3086ACey0rxEDodxNz3xOeh3jS7hasi/AmplcseWY9Cg34Od6Esg6d1g1K2TRB8Th7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709813195; c=relaxed/simple; bh=RzVgCi5G31QF/wLsnhacKT50pSUzPk+2wN7g7B6MIjc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FrWoJcMRM601s4u8EBcD4h+uomSHMolb3OtknKcv1cyzvNEjtKDmPOJwc/3zLAPIkU8YsUZiM377Hu2DKVtuVFo96hWsSMkq1EAj+u0tJk5+norcliiH3KKYIQGp2n+Q3xUaIx0vNhMVudJHwDfKYa4f7e3Vj3h00WzH+AITO+E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709813192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hVk1h9uFs78dGryrK3jkSylMrbZ7NgsmxChtM2laF6k=; b=D4REnUtH7h2GB85FEU4rpZJJOsUYyROUCiIxnAx4VOgfXc6+yU81JWpqCL2McGVD2847sh bO2PPgtAv57BxR+tTMoDb9bn6YfykqiIczh7vIEnMUaGslW9dQT7BxIo1W/AiXC8Pfic2P Ttte9FLtABK2O+ODyavruRtIPadcxZU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-1-fjgPweHyMW-6PUDFzdVxbQ-1; Thu, 07 Mar 2024 07:06:31 -0500 X-MC-Unique: fjgPweHyMW-6PUDFzdVxbQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F01E1C02D31; Thu, 7 Mar 2024 12:06:31 +0000 (UTC) Received: from localhost (unknown [10.42.28.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B0BD37F6; Thu, 7 Mar 2024 12:06:31 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Document that _GLIBCXX_CONCEPT_CHECKS might be removed in future Date: Thu, 7 Mar 2024 12:05:37 +0000 Message-ID: <20240307120630.482384-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Any objection to this update to make the docs reflect reality? -- >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 @@ The Compile-Time Checks 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. 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. - They are off by default for all versions of GCC from 3.0 to 3.4 (the - latest release at the time of writing). + They are off by default for all GCC 3.0 and all later versions. They can be enabled at configure time with --enable-concept-checks. You can enable them on a per-translation-unit basis with @@ -89,10 +88,17 @@ extensions, be aware of two things: 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 + <ranges> header and the new overloads in the + <algorithm> header for working with ranges. + The old library-simulated concept checks might be removed at a future date.