220 12889 <eddc850e-1521-4321-a133-fe270d8c8cd6@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Myriachan <myriachan@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: unevaluated this
Date: Mon, 15 Sep 2014 11:32:54 -0700 (PDT)
Lines: 102
Approved: news@gmane.org
Message-ID: <eddc850e-1521-4321-a133-fe270d8c8cd6@isocpp.org>
References: <009e6218-1e2b-402d-ab1a-e8ebf29f8f77@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_2211_985551478.1410805974216"
X-Trace: ger.gmane.org 1410805987 16772 80.91.229.3 (15 Sep 2014 18:33:07 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 15 Sep 2014 18:33:07 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKLT4PURQHRBWPB3SQAKGQE7TC7FCY@isocpp.org Mon Sep 15 20:33:03 2014
Return-path: <std-proposals+bncBDKLT4PURQHRBWPB3SQAKGQE7TC7FCY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qc0-f198.google.com ([209.85.216.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDKLT4PURQHRBWPB3SQAKGQE7TC7FCY@isocpp.org>)
	id 1XTb5A-0002cX-1o
	for gclcip-std-proposals@m.gmane.org; Mon, 15 Sep 2014 20:33:00 +0200
Original-Received: by mail-qc0-f198.google.com with SMTP id r5sf13409202qcx.9
        for <gclcip-std-proposals@m.gmane.org>; Mon, 15 Sep 2014 11:32:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=3PC1Y5EHMV5f7Tqcn/p2iz+KsnFtLfgHftN8fP0Qvds=;
        b=jllmz7H/m9A/XrHjZ3lnPf3CjsRmcU1WA/sea1TcGLuFJJLgxxdcFAVZcBImH3F1NL
         060UY8TuIyj+jW+A7NgOBj961gBY0ND/BFUZSW+jSaOYtAXFEbJOB369jX9A4bUW9HhF
         p//SOztkMoNSeLh6NaB2v6tUdHKylUquffeskmk966z7KLYnOWDPZFkMKtGNsoI29zZm
         zFkeWJho0FcE9kNWbXX8NzHRkF7oPctW/lKm/UjcsIjvE7kMpnyuSfzd02qb6sbpK5bL
         +fghdaMGEuFmzvB/V/hrx5NK4eONWbDzb1v7ITiD6NM8BvaksludiMQ9XmtxVqz1JP8i
         tbUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=3PC1Y5EHMV5f7Tqcn/p2iz+KsnFtLfgHftN8fP0Qvds=;
        b=X4dZ4ISUhB7zdbArjU1nu86eLgg5grbL/b+CfJ5r8DOCQElWOIaPO7D9OBHKYkEh5E
         SkVPR0mnutHnbyZmGuuRAXSJB6LJG3uyr/nds22rLZNIxZ9m3aGYDPxSBdCukvfJ1GlI
         gZ7Gniz+G6Z/qs3pxBmv0H7D3Z3SoKofuHgn/9VmXEY/qVOnACKvfM9zbQjlIYUiBKwu
         zsn5gQeJ1UuKdNs4zAK2Vs0uff5dcYdALUnVEHuS4pNJ+pNS6eLIhuYcYQTbg+yqyQXZ
         hnJTzQZyXNuqDBTT/jKcjWs31ctHiGuMoKlHgJ7rxn2nphdwzKYrSy7U3cD9xUyTcmCQ
         Y0gg==
X-Gm-Message-State: ALoCoQm8deEaJNQRB/orKc5XGEMBJUjcaz+CKeILxbQkB6SmnwzIFNhLKQIVzt3buQyRleAdkoiL
X-Received: by 10.52.36.197 with SMTP id s5mr16275745vdj.5.1410805978048;
        Mon, 15 Sep 2014 11:32:58 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.43.225 with SMTP id z1ls2159410igl.30.canary; Mon, 15 Sep
 2014 11:32:57 -0700 (PDT)
X-Received: by 10.50.114.98 with SMTP id jf2mr247525igb.4.1410805977048;
        Mon, 15 Sep 2014 11:32:57 -0700 (PDT)
In-Reply-To: <009e6218-1e2b-402d-ab1a-e8ebf29f8f77@isocpp.org>
X-Original-Sender: myriachan@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:12889
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12889>

------=_Part_2211_985551478.1410805974216
Content-Type: text/plain; charset=UTF-8

On Monday, September 15, 2014 9:17:17 AM UTC-7, Sean Middleditch wrote:
>
> Another proposal carrying on from work I did earlier. This is a 
> continuation of the decltype(class) feature I suggested some time back but 
> with Ville's suggestion taken to heart. It's now a proposal for allowing 
> `this` in unevaluated contexts (decltype, sizeof, etc.) anywhere in a class 
> definition body or base specifier list as well as a convenient helper 
> `std::this_t`.
>
>
> http://htmlpreview.github.io/?https://github.com/seanmiddleditch/CPlusPlus/blob/master/unevaluated-this.html
>
> Thoughts/comments/critiques would be appreciated. Thanks!
>

I don't see how std::this_t could be implemented, because there's no way it 
could know in which context it's being used.  Other than the amount of 
typing, this would work fine if this is allowed throughout class scope in 
all unevaluated contexts:

using my_type = std::remove_cv_t<std::remove_reference_t<decltype(*this)>>;

Melissa

-- 

--- 
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/.

------=_Part_2211_985551478.1410805974216
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, September 15, 2014 9:17:17 AM UTC-7, Sean Middl=
editch wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">=
Another proposal carrying on from work I did earlier. This is a continuatio=
n of the decltype(class) feature I suggested some time back but with Ville'=
s suggestion taken to heart. It's now a proposal for allowing `this` in une=
valuated contexts (decltype, sizeof, etc.) anywhere in a class definition b=
ody or base specifier list as well as a convenient helper `std::this_t`.<di=
v><br></div><div><a href=3D"http://htmlpreview.github.io/?https://github.co=
m/seanmiddleditch/CPlusPlus/blob/master/unevaluated-this.html" target=3D"_b=
lank" onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%=
2Fhtmlpreview.github.io%2F%3Fhttps%3A%2F%2Fgithub.com%2Fseanmiddleditch%2FC=
PlusPlus%2Fblob%2Fmaster%2Funevaluated-this.html\46sa\75D\46sntz\0751\46usg=
\75AFQjCNHWiZl9mP9IjHGA6PSACZ7fC-JtIw';return true;" onclick=3D"this.href=
=3D'http://www.google.com/url?q\75http%3A%2F%2Fhtmlpreview.github.io%2F%3Fh=
ttps%3A%2F%2Fgithub.com%2Fseanmiddleditch%2FCPlusPlus%2Fblob%2Fmaster%2Fune=
valuated-this.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHWiZl9mP9IjHGA6PSACZ7=
fC-JtIw';return true;">http://htmlpreview.github.io/?<wbr>https://github.co=
m/<wbr>seanmiddleditch/CPlusPlus/<wbr>blob/master/unevaluated-this.<wbr>htm=
l</a><br></div><div><br></div><div>Thoughts/comments/critiques would be app=
reciated. Thanks!</div></div></blockquote><div><br>I don't see how std::thi=
s_t could be implemented, because there's no way it could know in which con=
text it's being used.&nbsp; Other than the amount of typing, this would wor=
k fine if <span style=3D"font-family: courier new,monospace;">this</span> i=
s allowed throughout class scope in all unevaluated contexts:<br><br><div c=
lass=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); border-=
color: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wra=
p: break-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><=
span style=3D"color: #008;" class=3D"styled-by-prettify">using</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> my_type </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> std</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">remove_cv_t</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">std</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify">remove_reference_t</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">decltype</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">(*</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">this</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)&gt=
;&gt;;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
</span></div></code></div><br>Melissa<br></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 />

------=_Part_2211_985551478.1410805974216--

.
