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

Defer scalar conversions #308

Merged
merged 4 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions include/fkYAML/detail/conversions/from_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ from_string(const std::string& s, type_tag<UnsignedIntType> /*unused*/)
const auto tmp_ret = from_string(s, type_tag<unsigned long> {});
if (static_cast<long long>(std::numeric_limits<UnsignedIntType>::max()) < tmp_ret)
{
throw exception("Failed to convert an unsigned long long into an UnsignedInteger value.");
throw exception("Failed to convert an unsigned long long into an unsigned integer value.");
}

return static_cast<UnsignedIntType>(tmp_ret);
Expand Down Expand Up @@ -234,7 +234,7 @@ inline float from_string(const std::string& s, type_tag<float> /*unused*/)
}
catch (const std::exception& /*unused*/)
{
throw exception("Failed to a string into a float value.");
throw exception("Failed to convert a string into a float value.");
}

return ret;
Expand Down Expand Up @@ -270,7 +270,7 @@ inline double from_string(const std::string& s, type_tag<double> /*unused*/)
}
catch (const std::exception& /*unused*/)
{
throw exception("Failed to a string into a double value.");
throw exception("Failed to convert a string into a double value.");
}

return ret;
Expand Down
466 changes: 264 additions & 202 deletions include/fkYAML/detail/input/deserializer.hpp

Large diffs are not rendered by default.

Loading