[Patch] Regex back-reference support

Paolo Carlini paolo.carlini@oracle.com
Sat Aug 10 09:42:00 GMT 2013



Hi,

Tim Shen <timshen91@gmail.com> ha scritto:
>On Sat, Aug 10, 2013 at 4:58 PM, Paolo Carlini
><paolo.carlini@oracle.com> wrote:
>> 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.

Paolo



More information about the Libstdc++ mailing list