220 25463 <ne3cod$a8n$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Relocation as a solution for the valueless
 variant problem?
Date: Wed, 06 Apr 2016 12:16:13 -0400
Lines: 24
Approved: news@gmane.org
Message-ID: <ne3cod$a8n$1@ger.gmane.org>
References: <b4feb52d-4cd0-475f-9f3d-6694564bc1b0@isocpp.org>	<4187538d-68fa-4582-ba26-f406479abe67@isocpp.org>	<eafd831f-85d2-430c-9969-7d084e6d28d2@isocpp.org> <CALQmNFggBQSADjEqS7pEzcdPSStGJfXkJdX0d2CwW_TmwqA=yQ@mail.gmail.com>
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 1459959396 10988 80.91.229.3 (6 Apr 2016 16:16:36 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 6 Apr 2016 16:16:36 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBWHMSS4AKGQELC3G23I@isocpp.org Wed Apr 06 18:16:28 2016
Return-path: <std-proposals+bncBC37LBFWUIFBBWHMSS4AKGQELC3G23I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f72.google.com ([74.125.82.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBWHMSS4AKGQELC3G23I@isocpp.org>)
	id 1anq82-0003Zf-JW
	for gclcip-std-proposals@m.gmane.org; Wed, 06 Apr 2016 18:16:26 +0200
Original-Received: by mail-wm0-f72.google.com with SMTP id a140sf20184222wma.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 06 Apr 2016 09:16:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=XjujEeSPqoq7o+vJoPLrPoxy+fC8y3djP5V5FtCPjWU=;
        b=CKKYBuwVGZgNCSM+o8sEthvYDTVAEBbnxvMNk9MgM+36pEOlGKelDZHEISIyIERf3l
         ZVo07qJIbWKhlCY1aCS40ND9RW+SONR5lBVm2zNdHqZM0FRkXDRx1gzXHKG86vV0wl6S
         /VYniaElUhzDOofqM3PY525tixgGt7i/pOZmE9ldsA8i1fyXGN80IXVcZ2i4xYryRIEB
         Dq7n/kinMN/RxyLDAHyFUW/a14ZgnOmlJrcpkpUNERxP/T8l5Z5ZzaGN5z5kL121ucAZ
         mo5bxD8q+i25yoQA1aOmVpNQ3MyC/VgaAvVZPkPTKLTjRBnIdNOiaBefqKytimu/pR71
         E/gQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=XjujEeSPqoq7o+vJoPLrPoxy+fC8y3djP5V5FtCPjWU=;
        b=QNlxnu92afbphU2vRcmHKp+A8MNqC59dzx+DTioG7t4kr4sw7LD8At/GE2J5horm3d
         VvPtlWNX39zmDopLa4WMMFE9Sn8wfczBLcuarBMD2GwS0kliYhpyxE7bgeFPqb6pHSHH
         +HRiV07i+GbtJciIq69rCkRrwHzgszWtBWtzg7fTnfYgyQIdpHmf+VzzOSkqAVs6dn0c
         9sagJ2dbaVqLOMWHLxr7a6kk4kOvdHZFqWNgX73RP4pwDMEvhvsVbox2qn0zpZ5VW7Od
         /18XAwy/YX4UF50GlyD9V35bLU59SjaS24QjZpybk/p8SG9ft/1Ziz0rz+GAlPE+jAc8
         QTYA==
X-Gm-Message-State: AD7BkJJBz+dRc9UnmTQB/1hOvDtGjHQzadTzTMmXURZ6bkSu6GTXTPB9ZOPeBz2Z9ZoZ1A==
X-Received: by 10.28.232.10 with SMTP id f10mr2437746wmh.2.1459959386053;
        Wed, 06 Apr 2016 09:16:26 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.84.21 with SMTP id i21ls226471lfb.11.gmail; Wed, 06 Apr
 2016 09:16:24 -0700 (PDT)
X-Received: by 10.25.154.65 with SMTP id c62mr10715957lfe.54.1459959384274;
        Wed, 06 Apr 2016 09:16:24 -0700 (PDT)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id rs10si1421720lbb.152.2016.04.06.09.16.23
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Wed, 06 Apr 2016 09:16:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1anq7w-0003VR-8G
	for std-proposals@isocpp.org; Wed, 06 Apr 2016 18:16:20 +0200
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Wed, 06 Apr 2016 18:16:20 +0200
Original-Received: from mwoehlke.floss by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Wed, 06 Apr 2016 18:16:20 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 17
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To: <CALQmNFggBQSADjEqS7pEzcdPSStGJfXkJdX0d2CwW_TmwqA=yQ@mail.gmail.com>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mailfrom=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (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-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:25463
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25463>

On 2016-04-06 12:07, Sean Middleditch wrote:
> I personally find this relocation proposal currently incomplete and in
> need of a lot more iteration. With your proposal, it's way too easy to
> accidentally leave some object in an undefined state where the
> compiler has no idea and is stuck calling the destructor anyway. All
> it takes is passing an object via pointer to some function and *bam*
> insta-pain, as the caller has no way to know what the function will do
> and the function has no way to know what the caller wanted to allow,
> other than comments and documentation (no compiler support for error
> checking).

Right now, if I pass a pointer to an object to a function, that function
can `delete` the pointer. How does relocation make this any worse? In
both cases, the pointer passed in is no longer valid.

-- 
Matthew

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/ne3cod%24a8n%241%40ger.gmane.org.

.
