From nobody Sun Jan 19 18:19:34 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YbhZZ3tMxz5lY3v; Sun, 19 Jan 2025 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YbhZZ3C4vz3v7l; Sun, 19 Jan 2025 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737310774; 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=lpNtCu/6ADGH4BL7hF5pdrOofxpQPTcBGefXrvc1d/4=; b=arAMW4sl10E42H7BzLlVfsngckVv/SCr1eMCCpP+on9nZfYQPJXQSS2QP/vBv7iz2n6E3Q eetYjQe74VJNgkH2omN6oBbTNG1rYjuhoVrObo0f9Eu4LstQshQNC9/TkiPjGS6kHkWVD1 TtWcT1RigQ+zqb49S4Aq5TqEgAjOuUsx3MOYkKyKNAbKcSRigdVLqvPLLyrdz9CFP1F4qm EPVxRucI8l354X4iizdtNbnfRYxZtJBPKaPiRwVkCN9WFCjXSOVNO57IISuHzsKTApeHBo egVF2l08t/oxSvExrQzcYqKtjmtflZgeqScSRAAwAOHP5FrDX0L1LwGiyLzQDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737310774; 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=lpNtCu/6ADGH4BL7hF5pdrOofxpQPTcBGefXrvc1d/4=; b=HFmBYrHUq302FwXH3tg8nr1pmtABSO8dDdnzLhIc1//wTr62RlRQG7CEoyMXw86fJCUSdL ic9ZOXQ2vZZkCsenCIjtUIaPYUZW8LAE42zD6lVUr7P5y7Uhp6adQ8un1X12JyRZZxk95w M8qUN1EsyTqf1S6snlOyqZapiGJUMghjYEMZ61HzfmWjEBWK16gYI5qQ1MOidwdlbcW1SM NlFAK4vXUTR3ixNgZ2n1IR7EAz5BZtfyac8oX5afYQlIJMkE9AGpsHa3YhIvMsBkGQ+ONN fZO83vbhEDLkoM30I0ZoTiGRMItmEThV90xnf2MB5NfAmayf3ovFArCzrknRsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737310774; a=rsa-sha256; cv=none; b=shlsnqFXaJTPRPkDtLcfMB4gdJqknTMbY3E7delYpPUD0C4k3OIEW/9qNfMYn1QiH5k/wp 6W0877J1tD+K4yWhQYbKPBQilM0MdLIYlNi+8DojWX38NTqYs2cAEBcIXkwh/qK6z+uzuo 4IcIkKdRYL8UcB37ERIM/GlE7S/qwrbLArLsrcNgXCJuuhxTpPgjPep5GIQ1e2/z5ZpEb/ XZv7jzj3xy6toy2LV8RwmNRbe4v96zFYwTn/SGT28lwWOk0zU1TyRApN6AnlH8mA4xBZbH csxH+RgPWKEpEb+zvbU2rwsAM5ErIC82MeGvtRsdklsM/eOSmYcS25dgNK57/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YbhZZ2dJgz11MN; Sun, 19 Jan 2025 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50JIJYgT030668; Sun, 19 Jan 2025 18:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50JIJYhe030665; Sun, 19 Jan 2025 18:19:34 GMT (envelope-from git) Date: Sun, 19 Jan 2025 18:19:34 GMT Message-Id: <202501191819.50JIJYhe030665@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dimitry Andric Subject: git: 07795f50c324 - 2025Q1 - math/givaro: only declare std::bool_constant if it does not exist yet List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/2025Q1 X-Git-Reftype: branch X-Git-Commit: 07795f50c324d1030d2339292eb4d7dafb14db19 Auto-Submitted: auto-generated The branch 2025Q1 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=07795f50c324d1030d2339292eb4d7dafb14db19 commit 07795f50c324d1030d2339292eb4d7dafb14db19 Author: Dimitry Andric AuthorDate: 2025-01-19 15:56:44 +0000 Commit: Dimitry Andric CommitDate: 2025-01-19 18:17:55 +0000 math/givaro: only declare std::bool_constant if it does not exist yet While doing test builds for bug 284159 (math/linbox), I ran into an issue compiling against one of the math/givaro headers, with clang and libc++ 19: /usr/local/include/givaro/random-integer.h:40:14: error: reference to 'bool_constant' is ambiguous 40 | std::bool_constant<_Exact_Size>::type _Exact_Size_t; | ^ /usr/include/c++/v1/__type_traits/integral_constant.h:42:1: note: candidate found by name lookup is 'std::__1::bool_constant' 42 | using bool_constant = integral_constant; | ^ /usr/local/include/givaro/random-integer.h:16:5: note: candidate found by name lookup is 'std::bool_constant' 16 | using bool_constant = integral_constant; | ^ The problem is that random-integer.h attempts to declare std::bool_constant, even though libc++ headers already have this template. Conditionalize it on __cpp_lib_bool_constant [1], so it is only declared when necessary (i.e. if somebody compiles against and older C++ library). [1] https://en.cppreference.com/w/cpp/feature_test#cpp_lib_bool_constant PR: 284167 Approved by: pi (maintainer) MFH: 2025Q1 (cherry picked from commit 238564b86a506b7ec6e8a3b7b6be7a423cb50337) --- .../files/patch-src_kernel_integer_random-integer.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/math/givaro/files/patch-src_kernel_integer_random-integer.h b/math/givaro/files/patch-src_kernel_integer_random-integer.h index 901ddd8ea8e3..f8c7c62f7c21 100644 --- a/math/givaro/files/patch-src_kernel_integer_random-integer.h +++ b/math/givaro/files/patch-src_kernel_integer_random-integer.h @@ -1,6 +1,19 @@ --- src/kernel/integer/random-integer.h.orig 2021-12-14 10:00:03 UTC +++ src/kernel/integer/random-integer.h -@@ -91,7 +91,6 @@ namespace Givaro +@@ -11,10 +11,12 @@ + + #include "gmp++/gmp++.h" + ++#if __cpp_lib_bool_constant < 201505L + namespace std { + template + using bool_constant = integral_constant; + } ++#endif + + namespace Givaro + { +@@ -91,7 +93,6 @@ namespace Givaro if (this != &R) { _bits = R._bits; _integer = R._integer;