From nobody Sat Apr 06 20:18:38 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 4VBmrt6yJcz5HGfW; Sat, 6 Apr 2024 20:18:38 +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 4VBmrt3f6nz4LfJ; Sat, 6 Apr 2024 20:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712434718; 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=bgh6IMF/JGYQrAM3EabesKd8amdKtBp8/80ld/uQqjY=; b=yURaj4IpwIrqBztcRyqON3+vSnT66oGbmsG7dCFXkrW2bJnJRY3KNt2QcEJma7YZNXO9KK Y5UAxdMyNN8HJCnni3Xomad5ePYfh8ddGxT1TXQ5MxO2ALea8NwPR3kK5AMPVmwPgR268t 4Reu8rYViYHE7f0KC74uPjlghML+99iAp+DOZORgc8XLZFlXEaBrLPEUB4/IkgG/YmKNih qS1uZP+AquUMZovrn0AAXbsnTA0u1VnavMaKfVoEoRab9EFMNf6pgTzfnenuNbnL3g9IzA UwQXiQCq+CROemJKw01fDB8FLJ+r26OY20LApEgyuJk/+DUo0WOl0bDe3wIpww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712434718; a=rsa-sha256; cv=none; b=Q49XRq1uR7MYKp1D/tq18M0QWFlmyNZL+pN2fpy0TITUhn+/RNOyAxHpR24rRmNKHGLeiU n7CPtN+W4QN4MD28Ny+5Wi3BsS2hS40WpyHqeV6qVgiL99DlBz18ylLUNphzoqObKHJk10 1fGrBEsU+gzS4CJOAAsoFTykEGLzdddzCrc4mLCLrgdo7UORvwdQocF/QAWpizaP+vrBMH ROMAyqsOFDOtV+BfmYcHG40Di2mzwILJ917+5KdTJuFRsl4ud2heKBGG/6lKBIL94+pR0P UnOzJbxEj9WyWKFPW2CpLABWKWJQ2mvnE951Hl7RT+G8jZJBaeFSw5JC6DppKQ== 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=1712434718; 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=bgh6IMF/JGYQrAM3EabesKd8amdKtBp8/80ld/uQqjY=; b=Zi6rYQVmEMs2Z9cTkHcRh/fHrnV/ZPPKAiQwlq75O3G/Unl8LNzQ5UvU4qSdJBBmLGOM73 WkkPtxJVxk3q01WnT/PWHlxezGwa4oKlvKWJDuEYiWfwJVyu9tuNsjEXwiQzOnUfAQ8myG pTYahgxx8caKkE/pyvUNmJmtaXvUffMNl9J03V1UroHmeOtfCAaAP2jTL5z2r/n4HONj+i dPYRSpZjTso+JPpwEnJdb07Y7r8YY1QjxLKdlGXeRRAZab0wTsr+sCapuW2Yw0N34Od0Eq niZfERGZWLchP2maOFTTj7ztsHv8CIog6LWxB/u0b+Ze+w/bb2POp4Xa+cSd8A== 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 4VBmrt3CbgzxtX; Sat, 6 Apr 2024 20:18:38 +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 436KIcD5030080; Sat, 6 Apr 2024 20:18:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 436KIcST030077; Sat, 6 Apr 2024 20:18:38 GMT (envelope-from git) Date: Sat, 6 Apr 2024 20:18:38 GMT Message-Id: <202404062018.436KIcST030077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 868ee3f28556 - main - [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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 868ee3f2855615016ba87c14b9444c18a2e1ba30 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=868ee3f2855615016ba87c14b9444c18a2e1ba30 commit 868ee3f2855615016ba87c14b9444c18a2e1ba30 Author: Dimitry Andric AuthorDate: 2024-02-05 11:41:51 +0000 Commit: Dimitry Andric CommitDate: 2024-04-06 20:14:03 +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 --- 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