Skip to content

Commit b74406a

Browse files
Stuart Dootsonmurraycu
authored andcommitted
MSVC build: Fix 'C4127: conditional expression is constant' warning
1 parent 5586a71 commit b74406a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sigc++/tuple-utils/tuple_for_each.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,11 @@ tuple_for_each(T&& t, T_extras&&... extras)
9999
// We use std::decay_t<> because tuple_size is not defined for references.
100100
constexpr auto size = std::tuple_size<std::decay_t<T>>::value;
101101

102-
if (size == 0)
102+
if constexpr (size != 0)
103103
{
104-
return;
104+
detail::tuple_for_each_impl<T_visitor, size, T_extras...>::tuple_for_each(
105+
std::forward<T>(t), std::forward<T_extras>(extras)...);
105106
}
106-
107-
detail::tuple_for_each_impl<T_visitor, size, T_extras...>::tuple_for_each(
108-
std::forward<T>(t), std::forward<T_extras>(extras)...);
109107
}
110108

111109
} // namespace internal

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy