public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "timshen at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64441] A match_results returns an incorrect sub_match if the sub_match::matched is false Date: Tue, 10 Mar 2015 18:42:00 -0000 [thread overview] Message-ID: <bug-64441-4-CmzG5TrDBX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64441-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64441 --- Comment #4 from Tim Shen <timshen at gcc dot gnu.org> --- Author: timshen Date: Tue Mar 10 18:41:46 2015 New Revision: 221330 URL: https://gcc.gnu.org/viewcvs?rev=221330&root=gcc&view=rev Log: PR libstdc++/64441 * include/bits/regex.h (match_results<>::size, match_results<>::position, match_results<>::str, match_results<>::operator[], match_results<>::prefix, match_results<>::suffix, match_results<>::end, match_results<>::_M_resize, match_results<>::_M_unmatched_sub, match_results<>::_M_prefix, match_results<>::_M_suffix): Remove global __unmatched_sub. Add unmatched submatch as part of match_results. * include/bits/regex.tcc (__regex_algo_impl<>, regex_replace<>, regex_iterator<>::operator++): Adjust to use match_results::_M_prefix. * testsuite/28_regex/match_results/out_of_range_submatches.cc: New testcases. Added: trunk/libstdc++-v3/testsuite/28_regex/match_results/out_of_range_submatches.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/regex.h trunk/libstdc++-v3/include/bits/regex.tcc
next prev parent reply other threads:[~2015-03-10 18:42 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-64441-4@http.gcc.gnu.org/bugzilla/> 2014-12-31 10:28 ` timshen at gcc dot gnu.org 2014-12-31 14:21 ` kariya_mitsuru at hotmail dot com 2015-03-09 10:07 ` redi at gcc dot gnu.org 2015-03-09 10:08 ` redi at gcc dot gnu.org 2015-03-10 18:42 ` timshen at gcc dot gnu.org [this message] 2015-03-10 21:56 ` timshen at gcc dot gnu.org 2023-07-20 11:21 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-64441-4-CmzG5TrDBX@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).