2013/11/8 Jonathan Wakely <jwakely....@gmail.com>: > As I suggested yesterday on the libstdc++ list, this adds an overload > for string and vector iterators to extract a raw pointer and re-use > the _Compiler<const C*,...> specialization, so that std::regex(".") > and std::regex(std::string(".")) and std::regex(std::vector<char>(1, > '.')) only instantiate _Compiler<It,Tr> once. > > 2013-11-08 Jonathan Wakely <jwakely....@gmail.com> > > * include/bits/regex_compiler.h (__detail::__compile_nfa): Overload > so that std::basic_string<C> and std::vector<C> iterators dispatch to > the const C* compiler.
I have fully not grasped for which T the specializations of __has_contiguous_iter are intended to be used, but given the fact that + template<typename _Tp, typename _Alloc> + struct __has_contiguous_iter<std::vector<_Tp, _Alloc>> + : std::true_type + { }; exists I think you really want to exclude any vector<bool, Allocator> by additionally adding + template<typename _Alloc> + struct __has_contiguous_iter<std::vector<bool, _Alloc>> + : std::false_type + { }; - Daniel