From nobody Sat Apr 20 10:34:36 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 4VM7DY0l1gz5HWRQ; Sat, 20 Apr 2024 10:34:37 +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 4VM7DX5gTkz4SlM; Sat, 20 Apr 2024 10:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609276; 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=jkW3LazM8aARiSeyuyGYYMuMIjJ+itgDed5GWc8Qcq8=; b=SCgHSj1gq/lMHsYX1vzcxcnQk8NDktzwlR93IXLGuqjbcrIdik0ZXdOHphVjEwlEXNPQ5h PHUWJwQr/tmO0gjsJ8cnlmGQDPG8DJ3L90upJWxxY26oXprpkJEagUJW6omuActIgXSXj0 oxG9hjRhXWpOpW8GG+jgLXt0WZJ9F536A8Ee0/9jZwFJEM64xOtef/oLarfFDbKo1JeWhn tLKIXte2O43E7aAvOeCJ9EVx7kylaX+VRgL8A4JQa8PHX+jJSRjxM32Er8QwNR7PdN2woF ahheJ2avRUlsKwSl8B7A58S2uKHUgi/20ea5lo2MW3/+m9vYzeR40x3ZlI51jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609276; a=rsa-sha256; cv=none; b=TOCTWynUbk/nHWwrXzRi4ZEr9V2zMtrRADXVN5T2sUmEfqVuhxuMOqJE57FnM+tgAf2jmh OCi45TNc8EzFwMHemLQO/gglZb7Vf/MDY3yEMI/TUztZQXD/EDP5sQLoTjfiIn9AyrkC/c trSZGnrsaLuOq7Vsv4+KssIyb3/ecIjg3RzqQBDWXpJffvUXDid28T5A1dh/lplPeOVPz9 iUXN6WN8M+FZOz/s2p2Bc7f+i5nJ8xLKJffhBXyTg3bbsg0dxYILFXq48ZmWj6zADEgRmu t51NCrWPukIr9lyK9Pfmv8QSpa833aVTUq1h+w0+1WOz60aaBotT5ge/d7n8uQ== 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=1713609276; 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=jkW3LazM8aARiSeyuyGYYMuMIjJ+itgDed5GWc8Qcq8=; b=IdE1zf5kfkOZWEaJ1zgG6OIMN/+mLBQeuxXcoN++3lmVD0xOVQ6hpQvr2FYahM7Ok20k2Z oHD2TjaXFduDLAz6GX4rl6kwfbvcCqFs4bgk54B6YetsTnomfx6C4S9mqjzbJ7Rxb0Y/FW FpXqrf2kDeMMknwdoTJBGuJybrBF1pmfz5r8zrorbHltnKmau66GlVPTs62ArVuF0qrmRk +/PBQ4UWv3rUYax+bFDaWTkMErUXUH7RB5CBrjeBmc6UaCr1yoFyBvc6LpgAhuhTPokL6i TXpi3mE4oV4BsFJLkrYB5p61JnZ+W2PxZd4IcE6KpFze77YdxKo/Sd4/Zj2YqA== 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 4VM7DX5HskzYn7; Sat, 20 Apr 2024 10:34:36 +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 43KAYaCj013864; Sat, 20 Apr 2024 10:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAYaBt013861; Sat, 20 Apr 2024 10:34:36 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:34:36 GMT Message-Id: <202404201034.43KAYaBt013861@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: af050415f0c5 - stable/13 - [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/13 X-Git-Reftype: branch X-Git-Commit: af050415f0c5d1d2d0a22a45a7a8c964902399f7 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=af050415f0c5d1d2d0a22a45a7a8c964902399f7 commit af050415f0c5d1d2d0a22a45a7a8c964902399f7 Author: Dimitry Andric AuthorDate: 2024-02-05 11:41:51 +0000 Commit: Dimitry Andric CommitDate: 2024-04-19 21:24:46 +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