Skip to content

Commit

Permalink
Fix compatibility with chars_format in fast_float version 7
Browse files Browse the repository at this point in the history
This release changes `chars_format` from an `enum` to an `enum class`
with underlying type `uint64_t`.

https://github.com/fastfloat/fast_float/releases/tag/v7.0.0
  • Loading branch information
musicinmybrain committed Nov 22, 2024
1 parent 10207f0 commit 385721e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/scn/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,14 @@ scan_expected<std::ptrdiff_t> fast_float_fallback(impl_init_data<CharT> data,
struct fast_float_impl_base : impl_base {
fast_float::chars_format get_flags() const
{
unsigned format_flags{};
uint64_t format_flags{};
if ((m_options & float_reader_base::allow_fixed) != 0) {
format_flags |= fast_float::fixed;
format_flags |=
static_cast<uint64_t>(fast_float::chars_format::fixed);
}
if ((m_options & float_reader_base::allow_scientific) != 0) {
format_flags |= fast_float::scientific;
format_flags |=
static_cast<uint64_t>(fast_float::chars_format::scientific);
}

return static_cast<fast_float::chars_format>(format_flags);
Expand Down

0 comments on commit 385721e

Please sign in to comment.