[PATCH] PR libstdc++/81002 fix std::basic_regex range constructor

Jonathan Wakely jwakely@redhat.com
Wed Jun 7 17:00:00 GMT 2017


On 07/06/17 16:45 +0100, Jonathan Wakely wrote:
>Apparently std::basic_regex construction from forward iterators has
>never worked, because the call to __compile_nfa doesn't give the
>traits type. This reorders the template parameters so that only the
>traits type needs to be given explicitly, and the iterator type can be
>deduced.
>
>	PR libstdc++/81002
>	* include/bits/regex.h (basic_regex): Adjust call to __compile_nfa
>	so iterator type is deduced.
>	* include/bits/regex_compiler.h (__compile_nfa): Reorder template
>	parameters to allow iterator type to be deduced.
>	* testsuite/28_regex/basic_regex/ctors/basic/iter.cc: New.
>
>Tested powerpc64le-linux, committed to trunk.
>
>I'll commit a simpler change to the branches.

Here's the patch for the branches. This doesn't reorder the template
parameters, just adds the missing template argument list to the call.

Tested x86_64-linux, committed to gcc-7-branch, gcc-6-branch and
gcc-5-branch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2606 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170607/7919cf17/attachment.bin>


More information about the Libstdc++ mailing list