| 24 | } |
| 25 | |
| 26 | int main() { |
| 27 | // Regression tests for C++17 from_chars compatibility |
| 28 | // These cases were historically supported via strtoll(..., 0) but failed in naive C++17 std::from_chars |
| 29 | |
| 30 | test_parse<int>("+123", true, 123); // Explicit plus sign |
| 31 | test_parse<int>("0x10", true, 16); // Hex auto-detection |
| 32 | test_parse<int>("-0x10", true, -16); // Signed hex |
| 33 | test_parse<int>("010", true, 8); // Octal auto-detection |
| 34 | test_parse<int>("08", false, 0); // Invalid octal digits must be rejected |
| 35 | |
| 36 | std::cout << "All regression tests passed!" << std::endl; |
| 37 | return 0; |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected