This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 4/4] std::regex refactoring
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Daniel Krügler <daniel dot kruegler at gmail dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Tim Shen <timshen91 at gmail dot com>, "Stephen M. Webb" <stephen dot webb at bregmasoft dot ca>
- Date: Fri, 8 Nov 2013 16:03:13 +0000
- Subject: Re: [patch 4/4] std::regex refactoring
- Authentication-results: sourceware.org; auth=none
- References: <CAH6eHdSRGuFm_oMJnjLniZFw2nKdnKncCowOv_o4M7Ud3xgiLQ at mail dot gmail dot com> <CAGNvRgCFU2HcvyXVa69kg4Qdj=FRJs4ydL7V-9huSnn8Xv-Eow at mail dot gmail dot com> <CAH6eHdT2Qd_TjawPL6H4cMcBOzNsoVuQM5b5vsjuh9WQHT8xOQ at mail dot gmail dot com>
On 8 November 2013 15:41, Jonathan Wakely wrote:
> On 8 November 2013 14:51, Daniel Krügler wrote:
>> I have fully not grasped for which T the specializations of
>> __has_contiguous_iter are intended to be used,
>
> Currently, only std::container iterators passed to a basic_regex
> constructor, but in theory the trait could get moved to another header
> and used elsewhere in future.
Currently the vector<bool> specialization can never be reached,
because std::vector<bool> doesn't use __gnu_cxx::__normal_iterator
(and trying to pass vector<bool>::iterator to a regex ctor fails
anyway) so this is only a theoretical problem if we re-use
__has_contiguous_iter elsewhere.