220 12895 <CAOfiQqnMEJ3yOEFrsBJx0=YBGhgjXARhN0cf1Ep2qLamJcEOfw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: unevaluated this
Date: Mon, 15 Sep 2014 14:00:08 -0700
Lines: 218
Approved: news@gmane.org
Message-ID: <CAOfiQqnMEJ3yOEFrsBJx0=YBGhgjXARhN0cf1Ep2qLamJcEOfw@mail.gmail.com>
References: <009e6218-1e2b-402d-ab1a-e8ebf29f8f77@isocpp.org>
	<eddc850e-1521-4321-a133-fe270d8c8cd6@isocpp.org>
	<CALQmNFj+gbO8q+CqY+-_ob1xUfVwMXtVfKUGXUQhegVpET4_AQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11339e8883088e050320eb36
X-Trace: ger.gmane.org 1410814820 3327 80.91.229.3 (15 Sep 2014 21:00:20 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 15 Sep 2014 21:00:20 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBBWNG3WQAKGQEQWOPZZY@isocpp.org Mon Sep 15 23:00:15 2014
Return-path: <std-proposals+bncBDVNBJG4YAIBBWNG3WQAKGQEQWOPZZY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBWNG3WQAKGQEQWOPZZY@isocpp.org>)
	id 1XTdNb-00075z-1n
	for gclcip-std-proposals@m.gmane.org; Mon, 15 Sep 2014 23:00:11 +0200
Original-Received: by mail-oa0-f72.google.com with SMTP id g18sf23039840oah.11
        for <gclcip-std-proposals@m.gmane.org>; Mon, 15 Sep 2014 14:00:10 -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: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=0EynqAJBLedFxoVNXpQs8p/5nVCWNb2qNFk0Zxn8y5I=;
        b=HKpbVT/KPVHeR7Mz7lbaP30xRmzcviublb2xFNQbiAyl5SO5bC3xRbvPMlM30WTKxR
         CB4k0jkSgqLYz01REhXW00wnpFTLDMv2JVQQaO1XHMBY0oax1Gqns9/dikNuKx3NA07f
         U1aYJaGL0vkggfDW/MVynlOFq2ymsZ+TlNF0GttbbUelrd0xU2jbF0OksGn3iDMSwzTN
         OVEbMZj882IAOWoryX3tZZNMHmUq95+Rhg/uKXsIw3HXhKp29lwMVZKMErEVlMwvTUI0
         Pv5n7OJDOROGE20JXkXLfjuM4pdAlR5QzNryt/EIEDJruG5YLHkqIVM2qBATy/5oxA4w
         RpZQ==
X-Gm-Message-State: ALoCoQnzRoAkCOE08/BKvIducNnb0DG+Q3/o0EInbswh56FPgv0hxb+NqZ23pk/NXjzlwUjuJ52r
X-Received: by 10.42.188.210 with SMTP id db18mr17772381icb.9.1410814809993;
        Mon, 15 Sep 2014 14:00:09 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.21.146 with SMTP id 18ls1668602qgl.81.gmail; Mon, 15 Sep
 2014 14:00:09 -0700 (PDT)
X-Received: by 10.220.69.210 with SMTP id a18mr3528382vcj.67.1410814808967;
        Mon, 15 Sep 2014 14:00:08 -0700 (PDT)
Original-Received: from mail-vc0-x22d.google.com (mail-vc0-x22d.google.com [2607:f8b0:400c:c03::22d])
        by mx.google.com with ESMTPS id ci16si6712403vdb.93.2014.09.15.14.00.08
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 15 Sep 2014 14:00:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 2607:f8b0:400c:c03::22d as permitted sender) client-ip=2607:f8b0:400c:c03::22d;
Original-Received: by mail-vc0-f173.google.com with SMTP id le20so4039173vcb.32
        for <std-proposals@isocpp.org>; Mon, 15 Sep 2014 14:00:08 -0700 (PDT)
X-Received: by 10.221.44.69 with SMTP id uf5mr25660124vcb.4.1410814808620;
 Mon, 15 Sep 2014 14:00:08 -0700 (PDT)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.220.76.200 with HTTP; Mon, 15 Sep 2014 14:00:08 -0700 (PDT)
In-Reply-To: <CALQmNFj+gbO8q+CqY+-_ob1xUfVwMXtVfKUGXUQhegVpET4_AQ@mail.gmail.com>
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of metafoo@gmail.com designates 2607:f8b0:400c:c03::22d as permitted
 sender) smtp.mail=metafoo@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:12895
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12895>

--001a11339e8883088e050320eb36
Content-Type: text/plain; charset=UTF-8

On Mon, Sep 15, 2014 at 12:39 PM, Sean Middleditch <sean@middleditch.us>
wrote:

> Yeah, that was one of the open questions. Would using the this_t<>
> alternative (delaying the instantiation until the appropriate context)
> work?
>
> The this_t idea is just to offer a convenience shorthand. I don't
> think it's necessary, and the my_type you present is certainly
> acceptable; this isn't something users are expected to use directly
> too often.
>

The this_t thing doesn't work: 'this' will be interpreted in the context in
which it appears, and in the definition of 'this_t' it appears outside a
class, so is ill-formed.


> Thanks!
>
> On Mon, Sep 15, 2014 at 11:32 AM, Myriachan <myriachan@gmail.com> wrote:
> > 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 a topic in the
> > Google Groups "ISO C++ Standard - Future Proposals" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/pienLjyOVJk/unsubscribe
> .
> > To unsubscribe from this group and all its topics, 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/.
>
>
>
> --
> Sean Middleditch
> http://seanmiddleditch.com
>
> --
>
> ---
> 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/.
>

-- 

--- 
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/.

--001a11339e8883088e050320eb36
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Sep 15, 2014 at 12:39 PM, Sean Middleditch <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:sean@middleditch.us" target=3D"_blank">sean@middleditch.us</a>&=
gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, that was one of t=
he open questions. Would using the this_t&lt;&gt;<br>
alternative (delaying the instantiation until the appropriate context)<br>
work?<br>
<br>
The this_t idea is just to offer a convenience shorthand. I don&#39;t<br>
think it&#39;s necessary, and the my_type you present is certainly<br>
acceptable; this isn&#39;t something users are expected to use directly<br>
too often.<br></blockquote><div><br></div><div>The this_t thing doesn&#39;t=
 work: &#39;this&#39; will be interpreted in the context in which it appear=
s, and in the definition of &#39;this_t&#39; it appears outside a class, so=
 is ill-formed.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks!<br>
<span class=3D""><br>
On Mon, Sep 15, 2014 at 11:32 AM, Myriachan &lt;<a href=3D"mailto:myriachan=
@gmail.com">myriachan@gmail.com</a>&gt; wrote:<br>
&gt; On Monday, September 15, 2014 9:17:17 AM UTC-7, Sean Middleditch wrote=
:<br>
&gt;&gt;<br>
&gt;&gt; Another proposal carrying on from work I did earlier. This is a<br=
>
&gt;&gt; continuation of the decltype(class) feature I suggested some time =
back but<br>
&gt;&gt; with Ville&#39;s suggestion taken to heart. It&#39;s now a proposa=
l for allowing<br>
&gt;&gt; `this` in unevaluated contexts (decltype, sizeof, etc.) anywhere i=
n a class<br>
&gt;&gt; definition body or base specifier list as well as a convenient hel=
per<br>
&gt;&gt; `std::this_t`.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; <a href=3D"http://htmlpreview.github.io/?https://github.com/seanmi=
ddleditch/CPlusPlus/blob/master/unevaluated-this.html" target=3D"_blank">ht=
tp://htmlpreview.github.io/?https://github.com/seanmiddleditch/CPlusPlus/bl=
ob/master/unevaluated-this.html</a><br>
&gt;&gt;<br>
&gt;&gt; Thoughts/comments/critiques would be appreciated. Thanks!<br>
&gt;<br>
&gt;<br>
&gt; I don&#39;t see how std::this_t could be implemented, because there&#3=
9;s no way it<br>
&gt; could know in which context it&#39;s being used.=C2=A0 Other than the =
amount of<br>
&gt; typing, this would work fine if this is allowed throughout class scope=
 in<br>
&gt; all unevaluated contexts:<br>
&gt;<br>
&gt; using my_type =3D std::remove_cv_t&lt;std::remove_reference_t&lt;declt=
ype(*this)&gt;&gt;;<br>
&gt;<br>
&gt; Melissa<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; ---<br>
</span>&gt; You received this message because you are subscribed to a topic=
 in the<br>
<span class=3D"">&gt; Google Groups &quot;ISO C++ Standard - Future Proposa=
ls&quot; group.<br>
</span>&gt; To unsubscribe from this topic, visit<br>
&gt; <a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposal=
s/pienLjyOVJk/unsubscribe" target=3D"_blank">https://groups.google.com/a/is=
ocpp.org/d/topic/std-proposals/pienLjyOVJk/unsubscribe</a>.<br>
&gt; To unsubscribe from this group and all its topics, send an email to<br=
>
<span class=3D"im HOEnZb">&gt; <a href=3D"mailto:std-proposals%2Bunsubscrib=
e@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br>
&gt; To post to this group, send email to <a href=3D"mailto:std-proposals@i=
socpp.org">std-proposals@isocpp.org</a>.<br>
&gt; Visit this group at<br>
&gt; <a href=3D"http://groups.google.com/a/isocpp.org/group/std-proposals/"=
 target=3D"_blank">http://groups.google.com/a/isocpp.org/group/std-proposal=
s/</a>.<br>
<br>
<br>
<br>
</span><span class=3D"HOEnZb"><font color=3D"#888888">--<br>
Sean Middleditch<br>
<a href=3D"http://seanmiddleditch.com" target=3D"_blank">http://seanmiddled=
itch.com</a><br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
--<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%2Bunsubscribe@isocpp.org">std-propo=
sals+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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><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 />

--001a11339e8883088e050320eb36--

.
