mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-24 22:09:20 +02:00
Merge bitcoin/bitcoin#20457: util: Make Parse{Int,UInt}{32,64} use locale independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull}
4747db8761util: Introduce ToIntegral<T>(const std::string&) for locale independent parsing using std::from_chars(…) (C++17) (practicalswift) Pull request description: Make `Parse{Int,UInt}{32,64}` use locale independent `std::from_chars(…)` (C++17) instead of locale dependent `strto{l,ll,ul,ull}`. [About `std::from_chars`](https://en.cppreference.com/w/cpp/utility/from_chars): _"Unlike other parsing functions in C++ and C libraries, `std::from_chars` is locale-independent, non-allocating, and non-throwing."_ ACKs for top commit: laanwj: Code review ACK4747db8761Tree-SHA512: 40f2cd582bc19ddcf2c498eca3379167619eff6aa047bbac2f73b8fd8ecaefe5947c66700a189f83848751f9f8c05645e83afd4a44a1679062aee5440dba880a
This commit is contained in:
@@ -47,11 +47,11 @@ KNOWN_VIOLATIONS=(
|
||||
"src/test/dbwrapper_tests.cpp:.*snprintf"
|
||||
"src/test/fuzz/locale.cpp"
|
||||
"src/test/fuzz/parse_numbers.cpp:.*atoi"
|
||||
"src/test/fuzz/string.cpp"
|
||||
"src/torcontrol.cpp:.*atoi"
|
||||
"src/torcontrol.cpp:.*strtol"
|
||||
"src/util/strencodings.cpp:.*atoi"
|
||||
"src/util/strencodings.cpp:.*strtol"
|
||||
"src/util/strencodings.cpp:.*strtoul"
|
||||
"src/util/strencodings.cpp:.*strtoll"
|
||||
"src/util/strencodings.h:.*atoi"
|
||||
"src/util/system.cpp:.*atoi"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user