This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] Regex back-reference support
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Tim Shen <timshen91 at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Aug 2013 11:41:31 +0200
- Subject: Re: [Patch] Regex back-reference support
- References: <CAPrifD=AyZ7GuSgDr0q0nbKFZ3aYWXUL3ZQcytYKLNfUeDq3dg at mail dot gmail dot com> <5206009E dot 60604 at oracle dot com> <CAPrifDmxg-ah3fn982Q4-6XHwCHi+7oiordMHw-DWC4aT6bQGg at mail dot gmail dot com>
Tim Shen <firstname.lastname@example.org> ha scritto:
>On Sat, Aug 10, 2013 at 4:58 PM, Paolo Carlini
>> On 08/10/2013 10:37 AM, Tim Shen wrote:
>>> + regex_match(s, *(&s+1)-1, m, re);
>> I don't like these *(&s+1)-1.
>As you wish :)
See wasn't that difficult, after all ;) Seriously, a modern c++ programmer doesn't necessarily use all the time pointers, and frankly would not be able to figure out both type and value of that expression in a split second (remember this test, for the future ;)
More important: we are adding support for a non trivial feature and not a single comment in the new code refers to it. This is not ok, please add at least 2 or 3.