Are clang++ and libc++ compatible?

Dimitry Andric dim at FreeBSD.org
Wed Nov 13 07:46:28 UTC 2013


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131113/4449ccc3/attachment.sig>


More information about the freebsd-current mailing list