+6
−0
+61
−43
+21
−0
src/test/e2e/sto_exceptions_test.cpp
0 → 100644
+34
−0
Loading
They returned strtoX's clamped value and never threw: no
invalid_argument without digits, no out_of_range on ERANGE (or, for stoi,
outside int). mammut parses integer literals with stoll and falls back to
exact NUMERIC on out_of_range -- on FenrirOS it got LLONG_MAX for a 26-digit
literal and its SQL test failed in the package build ("bigint out of
range").
Now as the standard has them; pos as before, errno left alone on success.
<stdexcept> includes <string> first, so <string> only declares the two
throw helpers (std::__sto) and <stdexcept> defines them after its classes.
New e2e_sto_exceptions; ctest 174/174.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>