This commit is contained in:
David Markowitz
2025-01-02 18:42:50 -08:00
parent 7aaa69e42d
commit 6e66c5c362
4 changed files with 34 additions and 18 deletions

View File

@@ -18,6 +18,7 @@
#include "dPlatforms.h"
#include "Game.h"
#include "Logger.h"
#include "json_fwd.hpp"
enum eInventoryType : uint32_t;
enum class eObjectBits : size_t;
@@ -201,6 +202,10 @@ namespace GeneralUtils {
return isParsed ? static_cast<T>(result) : std::optional<T>{};
}
template<typename T>
requires(!Numeric<T>)
[[nodiscard]] std::optional<T> TryParse(std::string_view str);
#if !(__GNUC__ >= 11 || _MSC_VER >= 1924)
// MacOS floating-point parse helper function specializations