c++options: Remove unneeded C++20 header and resolve ambiguous call.

This commit is contained in:
John Ralls 2021-12-14 11:18:15 -08:00
parent a3f50586df
commit eb0bd4f998

View File

@ -26,7 +26,6 @@
#include <gnc-datetime.hpp>
#include <guid.hpp>
#include <cassert>
#include <charconv>
#include <sstream>
extern "C"
{
@ -697,7 +696,8 @@ GncOptionDateValue::deserialize(const std::string& str) noexcept
auto period_str{str.substr(date_value_pos)};
if (type_str == "absolute")
{
set_value(std::stoll(period_str));
// Need a cast to disambiguate from time64.
set_value(static_cast<size_t>(std::stoll(period_str)));
return true;
}
else if (type_str == "relative ")