Skip to content

Commit

Permalink
[reflection][fix][msvc]: warning C4127 (#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku authored Dec 23, 2024
1 parent ef849a1 commit fac0f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ylt/reflection/template_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ inline constexpr std::string_view type_string() {
constexpr auto next1 = str.rfind(sample[pos + 3]);
#if defined(_MSC_VER)
constexpr std::size_t npos = str.find_first_of(" ", pos);
if (npos != std::string_view::npos)
if constexpr (npos != std::string_view::npos)
return str.substr(npos + 1, next1 - npos - 1);
else
return str.substr(pos, next1 - pos);
Expand Down

0 comments on commit fac0f5e

Please sign in to comment.