Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing charconv static assert for Microsoft STL C++20. #16

Merged
merged 4 commits into from
Sep 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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