Re: Are clang++ and libc++ compatible?

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 13 Nov 2013 08:46:18 +0100
On 13 Nov 2013, at 08:29, Shane Ambler <FreeBSD_at_ShaneWare.Biz> wrote:
> On 13/11/2013 07:49, Tijl Coosemans wrote:
...
>> There's a similar problem with graphics/blender.  There's a class
>> TreeElement which links to its parent TreeElement like this:
>> 
>> std::map<std::string, TreeElement>::const_iterator parent;
>> 
>> Works with libstdc++, fails with libc++.  If the standard doesn't
>> specify this it would still be a very convenient extension.
>> 
> 
> A possible solution I found looking into this is to wrap the Entry
> reference in a std::unique_ptr - so changing -
> std::deque<Entry> messages;
> to -
> std::deque<std::unique_ptr<Entry>> messages;
> 
> This turns messages into a pointer so you need to change
> messages.date into messages->date

With pan, this is not so easy, unfortunately.  It needs changes all over
the place to make it work.  There was a patch for pkgsrc [1] which
attempted this, but it was backed out because it caused crashes.

-Dimitry

[1] http://mail-index.netbsd.org/pkgsrc-changes/2013/06/16/msg091009.html


Received on Wed Nov 13 2013 - 06:46:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:44 UTC