The method rope::copy(size_type __pos, size_type __n, _CharT* __buffer) const is not working in libstdc++ 4.3.0
I include a simple example q.cc that shows the problem: #include <ext/rope> int main() { __gnu_cxx::rope<char> r(128, ' '); r.append("1234",4); char buf[5]; r.copy(128,4,buf); return 0; } And this is the problem: $ g++ q.cc -o q -Wall /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_construct.h: In function void std::_Destroy(_ForwardIterator, _ForwardIterator, _Allocator&) [with _ForwardIterator = char*, _Allocator = const std::allocator<char>]: /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ext/rope:1963: instantiated from size_t __gnu_cxx::rope<_CharT, _Alloc>::copy(size_t, size_t, _CharT*) const [with _CharT = char, _Alloc = std::allocator<char>] q.cc:8: instantiated from here /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_construct.h:120: error: passing const std::allocator<char> as this argument of void __gnu_cxx::new_allocator<_Tp>::destroy(_Tp*) [with _Tp = char] discards qualifiers # g++ -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux Thread model: posix gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC) -- Summary: method rope::copy( . . . ) is not working Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mbarbe at palermo dot edu GCC build triplet: 4.3.0 GCC host triplet: 4.3.0 GCC target triplet: 4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37235