From nobody Sun Jan 19 18:10:51 2025 X-Original-To: dev-commits-ports-main@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 4YbhNW5DLpz5lXcd; Sun, 19 Jan 2025 18:10:51 +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 4YbhNW4Rz4z3t6d; Sun, 19 Jan 2025 18:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737310251; 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=MXofDiUvQxUFfUVPHrg/N5epwmFhsgLR8whBGn9L+Pg=; b=qXXJkMSHgDC5e2FUf0O5AvJWrMEEHVJpTJsOitf/oKyZ1Ogvk+0/Ld3HW85iOJptaeZ5U6 7mweNEKJ9i2S1Pk0NzqF/sTBx1OF8uGD3eOFw1Wmo8Y38efoBI3dy1TD2zxAyDZIBrZS4v wU1Opq/Qryh1VNK8XlHVsAUgIqyZl8cTroh0AkIe8vr9c3/klzL9A1i2DFvSqvlckccr1m ra7yxWlerViGlQyAYKxY6lJ7O7/9WWbmCR4N1rAhlZ4vFhEqJHiNoYBLcs0FzZ+ey6xVXd RLXLDv88QlhaPNduDCXDtVmamfjp/S3eG5gsr9Bt9mhHKdxz6n/jxtfoS+t9OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737310251; 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=MXofDiUvQxUFfUVPHrg/N5epwmFhsgLR8whBGn9L+Pg=; b=DtY+XVocLpBKKFDu5EtfoUCWLkOKh92olX36AmjuKRsX8y3E+QTSUce9SCsQuQYc7NtkNU 2Z0AaHDN5NaYl6/wRW6uyH2eAndUK6kuTTrwJNUMFbhnwUYQ5h5BYabLlCs/Q+366Bs/Wq SVa9HLe/CzqhrJg5svqeABBn0S1S+QcQ05GX+gCrioJzM3lVW4GaPhlts9SY7ilg7tKAkl gHWP1tLeFBsnrdg0Ah33jCBnIPOuUSfgRmWaO0Qkyo6t1ky4bT+YefanV4xOyzGKAC7F3Y Vq2xbtNLZHEQHB4QVvrnb+CwfyBXLhT0kdOvmzmlcZkfgWhLHjpQhU4Tyi6DJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737310251; a=rsa-sha256; cv=none; b=k2ikIlEII3s5kTrMoCo6WZX3lDTNdyYtN47cOxHBMMXq6R1L04Sj/PtdkJzAqh4G1a3V5f BHmVEfLd1XQHAkxAAnQkCOY6WbWykTA7p+qi9KjymetCMeVNUxEsp5NHMsE0F/3YU57yx+ Z97uo0oqKDR5IUjG39USOMF3roPsRQbjp3IpSl02uXcBcF+RQOGH/cNalbFdqrIPtrPEw4 bF2kLa/G01ujg/w2vtl0JYH+bJUuN74qziOkYdnOxENu5L+jvNaXRlZONy+6YK2Y6ARAMp unh3jrac/kNnTeK+60GRciew9LV/1L4MV3iCXhNlDlDtVXHTyaRNtJedLWxbRg== 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 4YbhNW40kcz10nR; Sun, 19 Jan 2025 18:10:51 +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 50JIApxa021002; Sun, 19 Jan 2025 18:10:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50JIApbc020999; Sun, 19 Jan 2025 18:10:51 GMT (envelope-from git) Date: Sun, 19 Jan 2025 18:10:51 GMT Message-Id: <202501191810.50JIApbc020999@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 238564b86a50 - main - math/givaro: only declare std::bool_constant if it does not exist yet List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: 238564b86a506b7ec6e8a3b7b6be7a423cb50337 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=238564b86a506b7ec6e8a3b7b6be7a423cb50337 commit 238564b86a506b7ec6e8a3b7b6be7a423cb50337 Author: Dimitry Andric AuthorDate: 2025-01-19 15:56:44 +0000 Commit: Dimitry Andric CommitDate: 2025-01-19 18:09:20 +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 --- .../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;