From owner-freebsd-current@FreeBSD.ORG Tue Nov 12 21:46:46 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF45A10F; Tue, 12 Nov 2013 21:46:46 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1B429C0; Tue, 12 Nov 2013 21:46:46 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::d18c:20bf:ce3b:e453] (unknown [IPv6:2001:7b8:3a7:0:d18c:20bf:ce3b:e453]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2A2D95C43; Tue, 12 Nov 2013 22:46:44 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_71532245-877E-43D3-8257-567251A582E0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: Are clang++ and libc++ compatible? From: Dimitry Andric In-Reply-To: <20131112221946.78602db0@kalimero.tijl.coosemans.org> Date: Tue, 12 Nov 2013 22:46:38 +0100 Message-Id: <9169A1F8-5773-459F-9763-5B50B4452D16@FreeBSD.org> References: <20131112163219.GA2834@troutmask.apl.washington.edu> <77CB2B92-216A-4C80-B033-7E582B5F0DFC@FreeBSD.org> <20131112165422.GA2939@troutmask.apl.washington.edu> <20131112175556.GA3319@troutmask.apl.washington.edu> <20131112201922.GA4330@troutmask.apl.washington.edu> <20131112221946.78602db0@kalimero.tijl.coosemans.org> To: Tijl Coosemans X-Mailer: Apple Mail (2.1822) Cc: freebsd-current@FreeBSD.org, David Chisnall , Steve Kargl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 21:46:46 -0000 --Apple-Mail=_71532245-877E-43D3-8257-567251A582E0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 12 Nov 2013, at 22:19, 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::const_iterator parent; > > Works with libstdc++, fails with libc++. If the standard doesn't > specify this it would still be a very convenient extension. The standard explicitly says this is undefined, except for a few specific (non-container) classes in C++11. So to write portable code, you should not rely on this "feature" to be available. Besides, it is relatively easy to work around. Except for the case of pan, where it is abused all over the place, and it seems tricky to fix without overhauling a lot of code... :-/ -Dimitry --Apple-Mail=_71532245-877E-43D3-8257-567251A582E0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlKCocYACgkQsF6jCi4glqMnXwCfebZAyTrZDE6onQPIYv4yCZMq 9mQAoIMVXZCILkkytPfWvlOGMoTSBRh/ =l7hj -----END PGP SIGNATURE----- --Apple-Mail=_71532245-877E-43D3-8257-567251A582E0--