Should fix builds...

This commit is contained in:
Martín Lucas Golini
2024-10-20 04:27:15 -03:00
parent 66002c3db8
commit 2e5f685275

View File

@@ -373,7 +373,17 @@ class EE_API String {
bool res = result.ec == std::errc{} && result.ptr == end;
return res;
} else {
static_assert( false, "String::fromString not implemented for this type" );
std::istringstream iss( s );
auto f = std::dec;
switch ( base ) {
case 8:
f = std::oct;
break;
case 16:
f = std::hex;
break;
}
return !( iss >> f >> t ).fail();
}
}