Skip to content

Commit

Permalink
Merge pull request #16 from can1357/sizeof-fix
Browse files Browse the repository at this point in the history
Fixing charconv static assert for Microsoft STL C++20.
  • Loading branch information
biojppm authored Sep 29, 2020
2 parents 0a1d7a1 + 28466ae commit 2fe974d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/c4/charconv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ inline C4_CONSTEXPR14 char to_c_fmt(RealFormat_e f)
'g', // FTOA_FLEX
'a', // FTOA_HEXA
};
C4_STATIC_ASSERT(sizeof(fmt) == _FTOA_COUNT);
C4_STATIC_ASSERT(C4_COUNTOF(fmt) == _FTOA_COUNT);
C4_ASSERT(f < _FTOA_COUNT);
return fmt[f];
}
Expand All @@ -141,7 +141,7 @@ inline constexpr std::chars_format to_std_fmt(RealFormat_e f)
std::chars_format::general, // FTOA_FLEX
std::chars_format::hex, // FTOA_HEXA
};
C4_STATIC_ASSERT(sizeof(fmt) == _FTOA_COUNT);
C4_STATIC_ASSERT(C4_COUNTOF(fmt) == _FTOA_COUNT);
C4_ASSERT(f < _FTOA_COUNT);
return fmt[f];
}
Expand Down

0 comments on commit 2fe974d

Please sign in to comment.