From owner-freebsd-current@FreeBSD.ORG Wed Nov 13 14:52:36 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 9E426FAB; Wed, 13 Nov 2013 14:52:36 +0000 (UTC) Received: from mail-vb0-x22c.google.com (mail-vb0-x22c.google.com [IPv6:2607:f8b0:400c:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 399482751; Wed, 13 Nov 2013 14:52:36 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id 11so345395vbe.17 for ; Wed, 13 Nov 2013 06:52:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=w7B2ZUF++XYcSM5X2dzA0CLuNLVx3CXlDVWZHiv4FO0=; b=O9oZ+kWv1s1u80vydmvAe5dnBwUtHMSuFI2wh7J9zHTdIWClIBVUbXXmtAfVMdbuKw sBYPQhq1ZWl+DXxBJ05HJV7rXsIBoWaOKPy7T0VA11zK7Rhws0zgtM1nUveO/2QEPThI k2N2S9zP/U3WWHQCqVwbP5nxw9WNvsLI0SRemcUujV++MKeaKFflrjMaX+rVetPvUkNA qF61rzaE+oxCwmWHmt5dTfDoedPrK6hp4cUDKIz3PNGwqgOv4QjRRJ2dKyBziKGxcBtX k3P0WFpE592AhyfeKTNM4D94qxaUfHh62Qfz7dEHzjmvm5BgU8zGylm7XgPXc2mZhdDB x34g== MIME-Version: 1.0 X-Received: by 10.220.75.73 with SMTP id x9mr553968vcj.38.1384354355336; Wed, 13 Nov 2013 06:52:35 -0800 (PST) Received: by 10.221.0.145 with HTTP; Wed, 13 Nov 2013 06:52:35 -0800 (PST) In-Reply-To: <52832A63.1000601@ShaneWare.Biz> 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> <52832A63.1000601@ShaneWare.Biz> Date: Wed, 13 Nov 2013 09:52:35 -0500 Message-ID: Subject: Re: Are clang++ and libc++ compatible? From: Zhihao Yuan To: Shane Ambler Content-Type: text/plain; charset=UTF-8 Cc: David Chisnall , Tijl Coosemans , Dimitry Andric , Steve Kargl , FreeBSD current 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: Wed, 13 Nov 2013 14:52:36 -0000 On Wed, Nov 13, 2013 at 2:29 AM, Shane Ambler wrote: > A possible solution I found looking into this is to wrap the Entry > reference in a std::unique_ptr - so changing - > std::deque messages; > to - > std::deque> messages; This "fix" is wrong. (Smart) pointers of T have comparison behaviors different from T itself, so this may silently change a program's runtime behavior. A better fix is to use `std::deque>`. Both libstdc++ and libc++ support vector, and vector's comparison behavior is as same as T. And of course,they both have value semantics. -- Zhihao Yuan, ID lichray The best way to predict the future is to invent it. ___________________________________________________ 4BSD -- http://4bsd.biz/