[PATCH 09/10] libstdc++: Simplify documentation of match_flag_type::format_default
Tomasz Kaminski
tkaminsk@redhat.com
Thu Apr 2 08:16:22 GMT 2026
On Thu, Apr 2, 2026 at 12:07 AM Jonathan Wakely <jwakely@redhat.com> wrote:
> This combines the $n and $nn items into one, which is more consistent
> with the EcmaScript docs.
>
> libstdc++-v3/ChangeLog:
>
> * include/bits/regex_constants.h (format_default): Simplify
> description of $n in Doxygen comment.
> ---
>
> Tested x86_64-linux, docs built with Doxygen 1.13.2 and 1.17.0 (from git)
>
LGTM. This is very nice improvment.
>
> libstdc++-v3/include/bits/regex_constants.h | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/libstdc++-v3/include/bits/regex_constants.h
> b/libstdc++-v3/include/bits/regex_constants.h
> index e18f162196e3..5fa78e18a3f1 100644
> --- a/libstdc++-v3/include/bits/regex_constants.h
> +++ b/libstdc++-v3/include/bits/regex_constants.h
> @@ -339,14 +339,10 @@ namespace regex_constants
> * This would be match_results::prefix().
> * @li $' The portion of the string that follows the matched substring.
> * This would be match_results::suffix().
> - * @li $n The nth capture, where n is in [1,9] and $n is not followed
> by a
> - * decimal digit. If n <= match_results::size() and the nth
> capture
> - * is undefined, use the empty string instead. If n >
> - * match_results::size(), the result is implementation-defined.
> - * @li $nn The nnth capture, where nn is a two-digit decimal number on
> - * [01, 99]. If nn <= match_results::size() and the nth
> capture is
> - * undefined, use the empty string instead. If
> - * nn > match_results::size(), the result is
> implementation-defined.
> + * @li $n The nth capture, where n is a positive integer less than 100.
> + * If `n <= match_results::size()` and the nth capture is
> undefined,
> + * use the empty string instead. If `n >
> match_results::size()`,
> + * the result is implementation-defined.
> */
> _GLIBCXX17_INLINE constexpr match_flag_type format_default = _S_default;
>
> --
> 2.53.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260402/e0fd2997/attachment-0001.htm>
More information about the Libstdc++
mailing list