From nobody Sat Apr 20 10:32:30 2024 X-Original-To: dev-commits-src-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 4VM7B66VLzz5HWFy; Sat, 20 Apr 2024 10:32:30 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VM7B642q3z4PYm; Sat, 20 Apr 2024 10:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609150; 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=Hbi7p0sAFVEKJP7rKLbZ7pzS7Gc+98fWp/JK9mqdKRw=; b=DLaUCikw0ryoqOmEQicEfV9RCovQvjX72WDwwcznhS7MbmM+DMKRi6/tZtZCWKGz2E/ZCy d3zmrxZ+QckV8hkM2vVvGOSng1C2TMwanLzwrdQUGSx39t0x9SoUna7abZ6Eh/EjgRcazi ICKogPquKTdlNsViQWxJzSB0ZUBSb7C0/gca1mHiVBJW1gX3t3CBT95ojlbE8pPREmhfdE 9FjXweXpUBuBLCwpTz4lCOMIaEFoxEfaXy/Rdw80lS4vaByxgUFH8NbmqxtdmdrdfprIjE KEFdIbHc1Ri/0D1IqEPzxZXI0EBfu218lWrLnR44IDZtUfPfLBXmYzKb62pq1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609150; a=rsa-sha256; cv=none; b=IyyZ+a+gUK5xoydF8rB+72FhQxs2XENu2pipzKc2NfUVsws/zCbHswH5TrpcAUb1hc4F04 QWcoVtop8hvJpbmPK0vLuSuslEKJhLjcq6PbonM185EmSGYOUGrtaNs2ShMOgpH5SYuMfP euUgNdmPtFuQtg+uuHFoJ7UzIK8arLyT5Sii7l3z1Eqw/Y7OqXhuS0e5oWFqv+uDWanj4q MTf4N7+8SDMU21GZ/RkrPvAYIcVmnZpGVBtBbL42rA6RKfXgCiHcsJgFIwWO4+oWad89FJ U7kT1da7Di23/veAZxtRvf7/toGf2zc+zUdewT75o894BIoqZz/K+QQMD/qjuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609150; 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=Hbi7p0sAFVEKJP7rKLbZ7pzS7Gc+98fWp/JK9mqdKRw=; b=jsqEWoc5UAcXaP+UUnHkJLsI04FrkHGWUrd9ZKOQcGx9LBmXCkdcC4RIBopKUVQFx4plXk +OUoe19+2gTL0s22qJPYVHA/EEWgNlKH48vbsTcIvSROjxrrA+/rgyLOsjdCkbAKoqzT3T qX4/aCmjx/SHsc/Rq0kLMY806CmQr0/zd1k8xWlu6UQc9Npi0r52cTV1Sdm4nq+SclcWGY P/bz3aHReSFpD7SEW3f2+TlDnkJ8sq39ZQZjUn8UCBCmXjrHRZIYgk25n8URDr5kRQ86NY BtHy88V1QnggKhDRgawa63gznGwGgHA1sdGF/dZFXESLR+hrcB/TMZPXvv1Xow== 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 4VM7B631W5zYhC; Sat, 20 Apr 2024 10:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43KAWU8U011213; Sat, 20 Apr 2024 10:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAWUIk011210; Sat, 20 Apr 2024 10:32:30 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:32:30 GMT Message-Id: <202404201032.43KAWUIk011210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 905954429d1f - stable/14 - [libc++] Rename __bit_reference template parameter to avoid conflict List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-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: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 905954429d1f6ccebb287379b66e1b58051be889 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=905954429d1f6ccebb287379b66e1b58051be889 commit 905954429d1f6ccebb287379b66e1b58051be889 Author: Dimitry Andric AuthorDate: 2024-02-05 11:41:51 +0000 Commit: Dimitry Andric CommitDate: 2024-04-19 21:14:15 +0000 [libc++] Rename __bit_reference template parameter to avoid conflict As of 4d20cfcf4eb08217ed37c4d4c38dc395d7a66d26, `__bit_reference` contains a template `__fill_n` with a bool `_FillValue` parameter. Unfortunately there is a relatively widely used piece of scientific software called NetCDF, which exposes a (C) macro `_FillValue` in its public headers. When building the NetCDF C++ bindings, this quickly leads to compilation errors when the macro interferes with the template in `__bit_reference`. Rename the parameter to `_FillVal` to avoid the conflict. PR: 276104 MFC after: 1 month (cherry picked from commit 868ee3f2855615016ba87c14b9444c18a2e1ba30) --- contrib/llvm-project/libcxx/include/__bit_reference | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__bit_reference b/contrib/llvm-project/libcxx/include/__bit_reference index 9032b8f01809..3a5339b72ddc 100644 --- a/contrib/llvm-project/libcxx/include/__bit_reference +++ b/contrib/llvm-project/libcxx/include/__bit_reference @@ -173,7 +173,7 @@ private: // fill_n -template +template _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { using _It = __bit_iterator<_Cp, false>; @@ -185,7 +185,7 @@ __fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - if (_FillValue) + if (_FillVal) *__first.__seg_ |= __m; else *__first.__seg_ &= ~__m; @@ -194,13 +194,13 @@ __fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) { } // do middle whole words __storage_type __nw = __n / __bits_per_word; - std::fill_n(std::__to_address(__first.__seg_), __nw, _FillValue ? static_cast<__storage_type>(-1) : 0); + std::fill_n(std::__to_address(__first.__seg_), __nw, _FillVal ? static_cast<__storage_type>(-1) : 0); __n -= __nw * __bits_per_word; // do last partial word if (__n > 0) { __first.__seg_ += __nw; __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - if (_FillValue) + if (_FillVal) *__first.__seg_ |= __m; else *__first.__seg_ &= ~__m; @@ -1007,7 +1007,7 @@ private: friend class __bit_iterator<_Cp, true>; template friend struct __bit_array; - template + template _LIBCPP_CONSTEXPR_SINCE_CXX20 friend void __fill_n(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n); template