From da86b213ce0e4061f6f003c2e2405ba26acfa4a5 Mon Sep 17 00:00:00 2001 From: frstrtr Date: Wed, 15 Jul 2026 09:03:38 +0000 Subject: [PATCH] btc: disambiguate HexStr overload at share_tracker.hpp:551 for MSVC std::vector (m_address.m_data) is a viable argument for all three HexStr span overloads (const uint8_t / const char / const std::byte) under MSVC.stricter overload resolution, causing C2668 ambiguous-call on the Windows build (GCC/Clang resolve it). Name the exact parameter type of the intended overload, Span, built from the raw byte span. Output is byte-identical to the prior GCC/Clang resolution (same bytes to the same uint8_t-span overload); verified against MakeUCharSpan on a fixture. Mirrors the explicit-span idiom already green on the LTC Windows build. --- src/impl/btc/share_tracker.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/impl/btc/share_tracker.hpp b/src/impl/btc/share_tracker.hpp index f9d20a075..aac5ad62a 100644 --- a/src/impl/btc/share_tracker.hpp +++ b/src/impl/btc/share_tracker.hpp @@ -548,7 +548,9 @@ class ShareTracker if constexpr (requires { s->m_pubkey_hash; }) miner = s->m_pubkey_hash.GetHex(); else if constexpr (requires { s->m_address; }) - miner = HexStr(s->m_address.m_data); + // MSVC: disambiguate HexStr overload (std::vector is viable + // for all span overloads). Feed the exact byte span the uint8_t overload wants. + miner = HexStr(Span(s->m_address.m_data.data(), s->m_address.m_data.size())); m_on_share_difficulty(diff, miner); }); }