2
0
mirror of https://github.com/boostorg/pfr.git synced 2026-01-19 04:22:13 +00:00

Workaround MSVC bogus warning (fixes #167)

This commit is contained in:
Antony Polukhin
2024-04-01 12:18:52 +03:00
parent 5f857d5503
commit 449bf360f7

View File

@@ -18,6 +18,7 @@ namespace boost { namespace pfr { namespace detail {
template <class T, std::size_t... I>
constexpr auto make_stdtuple_from_tietuple(const T& t, std::index_sequence<I...>) {
(void)t; // workaround for MSVC 14.1 `warning C4100: 't': unreferenced formal parameter`
return std::make_tuple(
boost::pfr::detail::sequence_tuple::get<I>(t)...
);
@@ -25,6 +26,7 @@ constexpr auto make_stdtuple_from_tietuple(const T& t, std::index_sequence<I...>
template <class T, std::size_t... I>
constexpr auto make_stdtiedtuple_from_tietuple(const T& t, std::index_sequence<I...>) noexcept {
(void)t; // workaround for MSVC 14.1 `warning C4100: 't': unreferenced formal parameter`
return std::tie(
boost::pfr::detail::sequence_tuple::get<I>(t)...
);
@@ -32,6 +34,7 @@ constexpr auto make_stdtiedtuple_from_tietuple(const T& t, std::index_sequence<I
template <class T, std::size_t... I>
constexpr auto make_conststdtiedtuple_from_tietuple(const T& t, std::index_sequence<I...>) noexcept {
(void)t; // workaround for MSVC 14.1 `warning C4100: 't': unreferenced formal parameter`
return std::tuple<
std::add_lvalue_reference_t<std::add_const_t<
std::remove_reference_t<decltype(boost::pfr::detail::sequence_tuple::get<I>(t))>