From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 F19F33858401 for ; Thu, 7 Mar 2024 12:06:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F19F33858401 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 F19F33858401 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=1709813196; cv=none; b=EObl89VGYWwCTOPlfGI/m3l1cWSb0QbzGvCHuKISQwESvXFZsxo7DUuIZw4QORPCbkAho8p8OFMslyJfnbfRXSbZO1WvR70GU20P2lu45HeAnR2P0DlKsOP6GzujEy4vmLRFV/GBwdniFeC/9sf8qPQe3QLPWuJljXvt6/lirnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709813196; c=relaxed/simple; bh=RzVgCi5G31QF/wLsnhacKT50pSUzPk+2wN7g7B6MIjc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PnCwQC2pxHRuFy4JH1hsUxIZNgiw6i7O23npgQG9BQQjKTf1t8w6pHzhFMRY3YA56bK8HtFXF+lFV5T8AXmESpKhST7iLB1okSPD6nHmnmyGHV85emchJ+4XHv26nKWnJrtUKZc5gDNqzcJVWfbLvpm5JxRteQcjj3LSMU2cNR4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709813194; 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=WfYVuIOz+O3zBmJaMebgx+GHt4JOeZpEcu5ixjDnxMuRUHRjV3b9WIcCJlEqrW/FiyqTBi qEQHoy0Z0qOHswGRKmtUOfB1GpPdapO75E2IGHySTxE51/g65Uf8/oW4V6SnD53fgdB+WO h01k92RIGjSYXNr8kmVMsv11PVDPDPQ= 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 Content-Type: text/plain Content-Transfer-Encoding: 8bit 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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. -- 2.43.2