Unlike the 64-bit version, to_uint32 is not guaranteed to convert negative values. Current implementation conflates fixed-width types (uint32, uint64) with types that have no guarantees on their exact sizes (unsigned long, unsigned long long) so results of internal conversions may differ between platforms. Converting strings representing negative numbers to unsigned integers looks like a bad idea
| 530 | // Converting strings representing negative numbers to unsigned integers looks like a bad |
| 531 | // idea anyway and it's not worth changing the implementation solely for this reason. |
| 532 | [[nodiscard]] inline bool to_uint32(char const * s, uint32_t & i, int base = 10) |
| 533 | { |
| 534 | return internal::ToInteger(s, i, base); |
| 535 | } |
| 536 | |
| 537 | [[nodiscard]] inline bool to_int32(char const * s, int32_t & i) |
| 538 | { |