Skip to content

Commit

Permalink
Merge pull request #298 from jrade/main
Browse files Browse the repository at this point in the history
Silenced Visual Studio compiler warning
  • Loading branch information
lemire authored Jan 16, 2025
2 parents be9a845 + d4d5748 commit 482cc1f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/fast_float/ascii_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,14 @@ parse_int_string(UC const *p, UC const *pend, T &value,
UC const *const first = p;

bool const negative = (*p == UC('-'));
#ifdef FASTFLOAT_VISUAL_STUDIO
#pragma warning(push)
#pragma warning(disable : 4127)
#endif
if (!std::is_signed<T>::value && negative) {
#ifdef FASTFLOAT_VISUAL_STUDIO
#pragma warning(pop)
#endif
answer.ec = std::errc::invalid_argument;
answer.ptr = first;
return answer;
Expand Down

0 comments on commit 482cc1f

Please sign in to comment.