From 449bf360f7d7a945639710b0fbb670ffde70e772 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Apr 2024 12:18:52 +0300 Subject: [PATCH] Workaround MSVC bogus warning (fixes #167) --- include/boost/pfr/detail/stdtuple.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/pfr/detail/stdtuple.hpp b/include/boost/pfr/detail/stdtuple.hpp index 4359e34..71424e0 100644 --- a/include/boost/pfr/detail/stdtuple.hpp +++ b/include/boost/pfr/detail/stdtuple.hpp @@ -18,6 +18,7 @@ namespace boost { namespace pfr { namespace detail { template constexpr auto make_stdtuple_from_tietuple(const T& t, std::index_sequence) { + (void)t; // workaround for MSVC 14.1 `warning C4100: 't': unreferenced formal parameter` return std::make_tuple( boost::pfr::detail::sequence_tuple::get(t)... ); @@ -25,6 +26,7 @@ constexpr auto make_stdtuple_from_tietuple(const T& t, std::index_sequence template constexpr auto make_stdtiedtuple_from_tietuple(const T& t, std::index_sequence) noexcept { + (void)t; // workaround for MSVC 14.1 `warning C4100: 't': unreferenced formal parameter` return std::tie( boost::pfr::detail::sequence_tuple::get(t)... ); @@ -32,6 +34,7 @@ constexpr auto make_stdtiedtuple_from_tietuple(const T& t, std::index_sequence constexpr auto make_conststdtiedtuple_from_tietuple(const T& t, std::index_sequence) noexcept { + (void)t; // workaround for MSVC 14.1 `warning C4100: 't': unreferenced formal parameter` return std::tuple< std::add_lvalue_reference_t(t))>