Skip to content

Commit fac0f5e

Browse files
authored
[reflection][fix][msvc]: warning C4127 (#865)
1 parent ef849a1 commit fac0f5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/ylt/reflection/template_string.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ inline constexpr std::string_view type_string() {
3636
constexpr auto next1 = str.rfind(sample[pos + 3]);
3737
#if defined(_MSC_VER)
3838
constexpr std::size_t npos = str.find_first_of(" ", pos);
39-
if (npos != std::string_view::npos)
39+
if constexpr (npos != std::string_view::npos)
4040
return str.substr(npos + 1, next1 - npos - 1);
4141
else
4242
return str.substr(pos, next1 - pos);

0 commit comments

Comments
 (0)