From 33971cce60e37821c6c443ab82b438b87953db12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Lalik?= Date: Wed, 24 May 2023 10:11:20 +0200 Subject: [PATCH 1/2] Fix example for user-defined types in documentation for 10.0.0 --- doc/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api.rst b/doc/api.rst index c593b13f0f26..d8bbb0dbff51 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -155,7 +155,7 @@ For example:: if (it != end && (*it == 'f' || *it == 'e')) presentation = *it++; // Check if reached the end of the range: - if (it != end && *it != '}') ctx.on_error("invalid format"); + if (it != end && *it != '}') format_error("invalid format"); // Return an iterator past the end of the parsed range: return it; From d3739c800ed3aa6f494597c062a7dfc452a29ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Lalik?= Date: Wed, 24 May 2023 10:29:13 +0200 Subject: [PATCH 2/2] Fix the fix --- doc/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api.rst b/doc/api.rst index d8bbb0dbff51..5f55a97893b0 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -155,7 +155,7 @@ For example:: if (it != end && (*it == 'f' || *it == 'e')) presentation = *it++; // Check if reached the end of the range: - if (it != end && *it != '}') format_error("invalid format"); + if (it != end && *it != '}') FMT_THROW(format_error("invalid format")); // Return an iterator past the end of the parsed range: return it;