220 13939 <CAGg_6+M+VmSR4rfB6WQgZMZMf9fFEVnVOCgotcWGyyAXJXemKw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Nevin Liber <nevin@eviloverlord.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Reconstruct function idea
Date: Wed, 15 Oct 2014 16:47:29 -0500
Lines: 68
Approved: news@gmane.org
Message-ID: <CAGg_6+M+VmSR4rfB6WQgZMZMf9fFEVnVOCgotcWGyyAXJXemKw@mail.gmail.com>
References: <ff612334-ae16-43d1-a650-580d0ce635f2@isocpp.org>
 <CAGg_6+OH-P=uxCx7YEWdJSRtrRfBYhGXh55eymvyM9Vjr+yKMg@mail.gmail.com> <8a74f08b-7453-4d1a-9f20-bc1d3866617c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f46d043890877e47c305057d168b
X-Trace: ger.gmane.org 1413409699 2947 80.91.229.3 (15 Oct 2014 21:48:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 15 Oct 2014 21:48:19 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE35H5S6IDBBGWX7OQQKGQEWO2F6OQ@isocpp.org Wed Oct 15 23:48:13 2014
Return-path: <std-proposals+bncBCE35H5S6IDBBGWX7OQQKGQEWO2F6OQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f197.google.com ([209.85.217.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCE35H5S6IDBBGWX7OQQKGQEWO2F6OQ@isocpp.org>)
	id 1XeWQV-0002pC-J3
	for gclcip-std-proposals@m.gmane.org; Wed, 15 Oct 2014 23:48:11 +0200
Original-Received: by mail-lb0-f197.google.com with SMTP id p9sf1199628lbv.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Oct 2014 14:48:11 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
         :date:message-id:subject: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=ZkGZv+mnjuLxXsIzj0eAj5If0e4EcN799CoPLJzUf9E=;
        b=d6uF6zRwLyaDbsYDtl6HL+w0r9IhMFNexKFnwhL5U3trIWU1F4GxZnQBzugZrjyCNn
         NM70Rx5GvOa6d8EaXAXkvddO43dvo3y3VgIH9LCCQmI+o1PMsZwVwxixoU2cHnkQKYJA
         qkNk3AQUyeqC9V4BtOAyaU1ux2APQ1ua1+BQKEOFk+irxBmh7nw7M10OFsYBkhTs4fsL
         YEHN7gHGxpDLxptT8XH9dyePUFq0+Vm4j0vWoVdSgPB4aFipW88fHULkzfznr3XPxASi
         hyf4QsW65yiRDrbCOoCblefrsSqxEmIPylZx4CGLs6iR9dK1AGzMQIb1X+gziWZ6wA4A
         AsRw==
X-Gm-Message-State: ALoCoQlJZavMLQfKfPzzFXJvSbDW1sJ7PBymIQfqBgm1FTKw0uGBfCRlLFeuohprEZsD4B0MqOxw
X-Received: by 10.180.96.101 with SMTP id dr5mr2574224wib.0.1413409691283;
        Wed, 15 Oct 2014 14:48:11 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.14.106 with SMTP id o10ls184327wic.13.gmail; Wed, 15 Oct
 2014 14:48:10 -0700 (PDT)
X-Received: by 10.194.90.144 with SMTP id bw16mr5296694wjb.133.1413409690354;
        Wed, 15 Oct 2014 14:48:10 -0700 (PDT)
Original-Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [2a00:1450:400c:c05::22a])
        by mx.google.com with ESMTPS id hj7si26990184wjb.114.2014.10.15.14.48.10
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 15 Oct 2014 14:48:10 -0700 (PDT)
Received-SPF: pass (google.com: domain of nliber@gmail.com designates 2a00:1450:400c:c05::22a as permitted sender) client-ip=2a00:1450:400c:c05::22a;
Original-Received: by mail-wi0-f170.google.com with SMTP id hi2so253315wib.3
        for <std-proposals@isocpp.org>; Wed, 15 Oct 2014 14:48:10 -0700 (PDT)
X-Received: by 10.180.73.65 with SMTP id j1mr14901211wiv.17.1413409689976;
 Wed, 15 Oct 2014 14:48:09 -0700 (PDT)
Original-Sender: nliber@gmail.com
Original-Received: by 10.194.242.198 with HTTP; Wed, 15 Oct 2014 14:47:29 -0700 (PDT)
In-Reply-To: <8a74f08b-7453-4d1a-9f20-bc1d3866617c@isocpp.org>
X-Original-Sender: nevin@eviloverlord.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of nliber@gmail.com designates 2a00:1450:400c:c05::22a as permitted
 sender) smtp.mail=nliber@gmail.com;       dkim=pass header.i=@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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13939
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13939>

--f46d043890877e47c305057d168b
Content-Type: text/plain; charset=UTF-8

On 15 October 2014 16:17, Myriachan <myriachan@gmail.com> wrote:

> While that is a nice feature, it's not the same as needing to do this to
> types that weren't created as std::optional<T>.
>

It is also *extremely* unsafe to do it with any class that can throw an
exception during construction or destruction.  Why would we want to
encourage such a bad habit?  I would vote strongly against such a
proposal.  Even if you SFINAEed it so that it only worked with constructors
and destructors marked noexcept, I'd still vote against it, as 99% of users
should never use such a function.


-- 
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

-- 

--- 
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/.

--f46d043890877e47c305057d168b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On 15 October 2014 16:17, Myriachan <span dir=3D"ltr">&lt;<a href=3D"mailto=
:myriachan@gmail.com" target=3D"_blank">myriachan@gmail.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div>While that is a nice feature,=
 it&#39;s not the same as needing to do this to types that weren&#39;t crea=
ted as <span style=3D"font-family:courier new,monospace">std::optional&lt;T=
&gt;</span>. <br></div></blockquote></div><br>It is also <i>extremely</i>=
=C2=A0unsafe to do it with any class that can throw an exception during con=
struction or destruction.=C2=A0 Why would we want to encourage such a bad h=
abit?=C2=A0 I would vote strongly against such a proposal.=C2=A0 Even if yo=
u SFINAEed it so that it only worked with constructors and destructors mark=
ed noexcept, I&#39;d still vote against it, as 99% of users should never us=
e such a function.<br><br clear=3D"all"><div><br></div>-- <br>=C2=A0Nevin &=
quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:nevin@eviloverlord.=
com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=C2=A0 (847) 691-1404
</div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--f46d043890877e47c305057d168b--

.
