220 8763 <CAGdQazdD-fe1o5J6uZ4Sh0+ETwHBu5kVe9ZQ21gTeYV9pFMSCQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Sebastian Gesemann <s.gesemann@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Comments on 2d api for c++ N3888.pdf
Date: Thu, 23 Jan 2014 12:09:41 +0100
Lines: 37
Approved: news@gmane.org
Message-ID: <CAGdQazdD-fe1o5J6uZ4Sh0+ETwHBu5kVe9ZQ21gTeYV9pFMSCQ@mail.gmail.com>
References: <9105f9b2-e15d-4bf8-a4a1-65ebc3657eb0@isocpp.org>
	<905c4911-c4d0-4356-bdd1-eeee0d232cf6@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1390475376 3298 80.91.229.3 (23 Jan 2014 11:09:36 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 23 Jan 2014 11:09:36 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDO4ZQHJWIBRB5XQQOLQKGQE57QTKPQ@isocpp.org Thu Jan 23 12:09:45 2014
Return-path: <std-proposals+bncBDO4ZQHJWIBRB5XQQOLQKGQE57QTKPQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qa0-f69.google.com ([209.85.216.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDO4ZQHJWIBRB5XQQOLQKGQE57QTKPQ@isocpp.org>)
	id 1W6IAJ-0001BM-BW
	for gclcip-std-proposals@m.gmane.org; Thu, 23 Jan 2014 12:09:43 +0100
Original-Received: by mail-qa0-f69.google.com with SMTP id w8sf2636862qac.0
        for <gclcip-std-proposals@m.gmane.org>; Thu, 23 Jan 2014 03:09:42 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=I2eUR+Utk8c+7h3Hh48qpvnvzgqMZwsNMgK++5k4Hkg=;
        b=ZR8CME33vAnBeXXGGnkN2lhmgnXgtS6sJEiis4ahut3peu6moZGQ2o294HvaFSSiAy
         /brtj8xbn3b5ChM5opRhF6bHet9R8Xsmr2IWfDw7jgXrlRdAGUc+S200BlphY5kJZbkL
         n0d/i3mCFrNZkeONoi6zmhyznIXsIJml63AR0G0RroBZHdiRj6JHe3ryerw3p+kEFQCj
         SpDlBdN3ZY7xlMYpmldtAu+9Z8U6694DNKcDB06upKnsz9GXTi+zAyGd0aSSaaswbpoY
         pRDbPdSPRRbhoscqfuTHidCad7Zoq7ZxDoE5Q/X9/yUsBIfMhzpY7Y8GbjWDmeJ2zVYy
         UjPQ==
X-Gm-Message-State: ALoCoQnQSENqb3LyrP+eamjeP5O3MrIFNWwUNXXDLIBfuqIXoEoSd3VLPQ7hlrWXnj5w0lrahIZb
X-Received: by 10.58.253.33 with SMTP id zx1mr2685206vec.10.1390475382507;
        Thu, 23 Jan 2014 03:09:42 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.87.134 with SMTP id r6ls290098qgd.47.gmail; Thu, 23 Jan
 2014 03:09:42 -0800 (PST)
X-Received: by 10.236.91.101 with SMTP id g65mr7025753yhf.35.1390475382054;
        Thu, 23 Jan 2014 03:09:42 -0800 (PST)
Original-Received: from mail-qa0-x22c.google.com (mail-qa0-x22c.google.com [2607:f8b0:400d:c00::22c])
        by mx.google.com with ESMTPS id f25si14892631yho.253.2014.01.23.03.09.41
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 23 Jan 2014 03:09:42 -0800 (PST)
Received-SPF: pass (google.com: domain of s.gesemann@gmail.com designates 2607:f8b0:400d:c00::22c as permitted sender) client-ip=2607:f8b0:400d:c00::22c;
Original-Received: by mail-qa0-f44.google.com with SMTP id w5so2003839qac.3
        for <std-proposals@isocpp.org>; Thu, 23 Jan 2014 03:09:41 -0800 (PST)
X-Received: by 10.140.94.214 with SMTP id g80mr9862193qge.19.1390475381771;
 Thu, 23 Jan 2014 03:09:41 -0800 (PST)
Original-Received: by 10.96.15.231 with HTTP; Thu, 23 Jan 2014 03:09:41 -0800 (PST)
In-Reply-To: <905c4911-c4d0-4356-bdd1-eeee0d232cf6@isocpp.org>
X-Original-Sender: s.gesemann@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of s.gesemann@gmail.com designates 2607:f8b0:400d:c00::22c as
 permitted sender) smtp.mail=s.gesemann@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8763
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8763>

On Thu, Jan 23, 2014 at 11:44 AM, Edward Catmur <ed@catmur.co.uk> wrote:
> On Wednesday, 22 January 2014 03:01:02 UTC, germa...@gmail.com wrote:
>>
>> I have been taking a look at http://isocpp.org/files/papers/N3888.pdf
>> The current proposal proposes this:
>>
>>     auto x1 = some_object();
>>     //Silently aliases x1
>>     auto x2 = x1;
>>
>> I think this approach won't be satisfactory, since it violates the usual
>> semantics for c++ objects, at least in the standard library.

Well, there is std::shared_ptr.

> I agree; the paper proposes an alternative reference semantics using the
> existing unique_ptr and shared_ptr.  This would allow:
>
>     unique_ptr<surface> surf = make_surface(...);
>     unique_ptr<context> ctx = make_context(*surf, ...);
>
> Alternatively, make_surface() could be written surface::make() etc. The copy
> constructors and assignment operators would be deleted; constructors would
> be private.

The deleter type of a unique_ptr is not type-erased. This could be a
problem especially if other kinds of resources are involved (like GPU
resources).

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
