[Patch] [libstdc++] [C++0x] Export std::string base object move constructor.

Jakub Jelinek jakub@redhat.com
Tue Mar 22 14:11:00 GMT 2011


On Tue, Mar 22, 2011 at 02:52:47PM +0100, Paolo Carlini wrote:
> >So, if Benjamin or other libstdc++ maintainers want it fixed for
> >4.6, you want a patch like attached, plus some testcases for both
> >std::string and std::wstring.
> Jakub, such a patch would be ok with me, if isn't too late, but,
> frankly I don't see why we are not seeing the issue in the existing
> cons/char/moveable.cc, maybe it's something sensitive to inlining
> decisions (yes a testcase is welcome!), and then if we are going to
> do this, I'm not sure we don't need it for more (inline) member
> functions of basic_string, in particular I'm worried by the
> constructor taking an initializer_list and an allocator, is it
> already exported?

All I did was write a mechanical patch after noticing
that http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155788
added just
    # string|wstring move contructor, move assignment operator and
    # move assign.
    _ZNSsC1EOSs;
    _ZNSbIwSt11char_traitsIwESaIwEEC1EOS2_;
    _ZNSsaSEOSs;
    _ZNSbIwSt11char_traitsIwESaIwEEC1EOS2_;
    _ZNSs6assignEOSs;
    _ZNSbIwSt11char_traitsIwESaIwEE6assignEOS2_;
and http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156556
tweaked it:
-    _ZNSbIwSt11char_traitsIwESaIwEEC1EOS2_;
+    _ZNSbIwSt11char_traitsIwESaIwEEaSEOS2_;
i.e. from ctors only the complete ctors and not the base ctors.
Probably the testcases use only complete ctors...
And I couldn't find other cases in gnu.ver that would only
export the complete ctor and not the base ctor at the same time,
these two were the only ones.

The patch btw passed check-abi and no FAILs so far in libstdc++ testing.

	Jakub



More information about the Gcc-patches mailing list