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:
@@ -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))>
|
||||
|
||||
Reference in New Issue
Block a user