Created attachment 30644 [details] reproducing source code and output of -v option The following valid code fails to compile with 4.9.0 20130804 and `-D_GLIBCXX_DEBUG': //============================ #include <vector> int main() { std::vector<wchar_t> v; char c = 'a'; v.insert(v.begin(), &c, &c); // compile error } //============================ The above code successfully compiles with 4.9.0 20130728 and `-D_GLIBCXX_DEBUG'. So this seems a regression, which has been introduced between 20130728 and 20130804. The same problem also occurs for `std::deque'.
Francois, can you please have a look?
-std=c++11 / gnu++11 required
Author: fdumont Date: Fri Aug 30 20:55:37 2013 New Revision: 202121 URL: http://gcc.gnu.org/viewcvs?rev=202121&root=gcc&view=rev Log: 2013-08-30 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/58148 * include/debug/functions.h (__foreign_iterator_aux4): Use sequence const_pointer as common type to compare pointers. Add a fallback overload in case pointers cannot be cast to sequence const_pointer. * testsuite/23_containers/vector/modifiers/insert/58148.cc: New. Added: trunk/libstdc++-v3/testsuite/23_containers/vector/modifiers/insert/58148.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/debug/functions.h
Fixed.