// SPDX-License-Identifier: MIT #pragma once #include #include #include #include namespace FEXCore::StrConv { template bool Conv(std::string_view Value, T* Result) { if constexpr (std::is_signed_v) { *Result = static_cast(std::strtoll(Value.data(), nullptr, 0)); } else { *Result = static_cast(std::strtoull(Value.data(), nullptr, 0)); } return true; } template, T>> bool Conv(std::string_view Value, T* Result) { *Result = static_cast(std::strtoull(Value.data(), nullptr, 0)); return true; } inline bool Conv(std::string_view Value, fextl::string* Result) { *Result = Value; return true; } } // namespace FEXCore::StrConv