220 16282 <b9e49990-712d-412e-9789-6aa83f22c0de@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Scott Prager <splinterofchaos@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Pointers to members of unknown class
Date: Mon, 16 Feb 2015 06:58:57 -0800 (PST)
Lines: 137
Approved: news@gmane.org
Message-ID: <b9e49990-712d-412e-9789-6aa83f22c0de@isocpp.org>
References: <9b03a820-0ac5-4931-9825-b2fc9ef893f9@isocpp.org>
 <885c1fbd-8701-4f70-b7ad-89ee9104f42d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1233_1971991114.1424098737328"
X-Trace: ger.gmane.org 1424098755 23214 80.91.229.3 (16 Feb 2015 14:59:15 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 16 Feb 2015 14:59:15 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCU6PTE6UUGBBMMLRCTQKGQER4ZJA4Q@isocpp.org Mon Feb 16 15:59:00 2015
Return-path: <std-proposals+bncBCU6PTE6UUGBBMMLRCTQKGQER4ZJA4Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCU6PTE6UUGBBMMLRCTQKGQER4ZJA4Q@isocpp.org>)
	id 1YNN8V-0002lM-IO
	for gclcip-std-proposals@m.gmane.org; Mon, 16 Feb 2015 15:58:59 +0100
Original-Received: by iecrl12 with SMTP id rl12sf226069153iec.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 16 Feb 2015 06:58:58 -0800 (PST)
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
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=sDrv7V5SOEq1DgNmTP+6g3p19+PAnQLctrmpb74Iw1w=;
        b=mnZc8/u1OQ2f65PURBhgv5FT+OIUbJGSVxLwdxllvg2GD3DFksCrtrKxrLUncLfAN5
         ahDQgEiF1fELkkZLygAHDCuOMxJPBnah75RQ6VY7EhcmLEHqzF0MeetzyFHrZS7y2XY2
         xog61DtDn5CuXAOaA/cVigQEey2SUwD74fxZAdZaYQeadfFQ1y3fBr96lNcBL+yKtmsG
         uNg9++Zh3F8GIovd88FRH7/78Bmvi2/pYycfsUKAa4fLeN+mlk3MEoSs/pBYgpukIHRY
         CKgDFK7VpIidbtZ9aqOmzMBT45tnSB+FqpWE5sQPceGdMid/Rt0YrKfxXdVNxuBUNOM/
         btxQ==
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:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=sDrv7V5SOEq1DgNmTP+6g3p19+PAnQLctrmpb74Iw1w=;
        b=f3VpLMfIk+xnNUC+xqzUP4DNHw8pYE5uwZwoBELmxAhPIkLxmQ2DowvyeZAYMLyUcP
         X7bh0QBGQDdGBwPZKAbZSJeyGBNECx7ObnAg5AGUtKYMRThrE1MuKWxZWFkxBV1d6YZ4
         p+S/2fVBHP2t5Hea2CGelrhwE4XcMpJnFcoCuYJ8idxdqJBA93IVJ+bl2IJd1mAIme+N
         JCZSxozyYpaXLvVRn9etj7LEKqupV9We+k22aYYU2P8xkImEsk896ldJ5xvn27hFFj7X
         aba0rK5veqPfBoPNRDFfLCs3jgiIY+LTcsfwDIu4Qn3fa2eXB5skzbsBD6oCgQAEGR1C
         WKhQ==
X-Gm-Message-State: ALoCoQn8kYm7n9SIDi2RcIcWgsINKL0s5/6sRcZczv2ZSlSnZ2z40d5UnFHlxcrLOqHk2J2ysaBl
X-Received: by 10.182.224.169 with SMTP id rd9mr20121926obc.41.1424098738392;
        Mon, 16 Feb 2015 06:58:58 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.94.170 with SMTP id g39ls2491447qge.28.gmail; Mon, 16 Feb
 2015 06:58:57 -0800 (PST)
X-Received: by 10.140.96.202 with SMTP id k68mr279998qge.24.1424098737620;
        Mon, 16 Feb 2015 06:58:57 -0800 (PST)
In-Reply-To: <885c1fbd-8701-4f70-b7ad-89ee9104f42d@isocpp.org>
X-Original-Sender: SplinterOfChaos@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:16282
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/16282>

------=_Part_1233_1971991114.1424098737328
Content-Type: multipart/alternative; 
	boundary="----=_Part_1234_1139528847.1424098737328"

------=_Part_1234_1139528847.1424098737328
Content-Type: text/plain; charset=UTF-8



On Monday, February 16, 2015 at 5:58:52 AM UTC-5, Markus Grech wrote:
>
> I have updated the proposal, feedback would be very appreciated.
>
> https://docs.google.com/document/d/1B4zWiym1twufigKA4RSXYR5xU4g32EJ8XNl_bzFtX08/edit?usp=sharing
>

One possible use-case that I don't see in this proposal:

struct X { int mem; };
struct Y { int mem; };


int void::* p = X::mem;
auto xp = static_cast<int X::*>(p);  // (1)
auto yp = static_cast<int Y::*>(p);  // (2)


Obviously, *(1) *should be valid, and you describe such a round trip in the 
proposal, but what about *(2)*?
Certainly not valid, but I don't see anything prohibiting it.

-- 

--- 
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_1234_1139528847.1424098737328
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Monday, February 16, 2015 at 5:58:52 AM UTC-5, =
Markus Grech wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"ltr"><font color=3D"#000000" face=3D"Arial"><span style=3D"font-size:15px;=
white-space:pre-wrap">I have updated the proposal, feedback would be very a=
ppreciated.</span></font><div><a href=3D"https://docs.google.com/document/d=
/1B4zWiym1twufigKA4RSXYR5xU4g32EJ8XNl_bzFtX08/edit?usp=3Dsharing" rel=3D"no=
follow" target=3D"_blank" onmousedown=3D"this.href=3D'https://docs.google.c=
om/document/d/1B4zWiym1twufigKA4RSXYR5xU4g32EJ8XNl_bzFtX08/edit?usp\75shari=
ng';return true;" onclick=3D"this.href=3D'https://docs.google.com/document/=
d/1B4zWiym1twufigKA4RSXYR5xU4g32EJ8XNl_bzFtX08/edit?usp\75sharing';return t=
rue;">https://docs.google.com/<wbr>document/d/<wbr>1B4zWiym1twufigKA4RSXYR5=
xU4g32<wbr>EJ8XNl_bzFtX08/edit?usp=3D<wbr>sharing</a></div></div></blockquo=
te><div><br></div><div>One possible use-case that I don't see in this propo=
sal:</div><div><br></div><div class=3D"prettyprint" style=3D"border: 1px so=
lid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb(250, 2=
50, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span =
style=3D"color: #008;" class=3D"styled-by-prettify">struct</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> X </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> mem</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">};</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">struct</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> Y </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> mem</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">};</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br><br></=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">void</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">::*</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> p </span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> X</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">mem</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><=
span style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> xp </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">static_cast</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> X</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">::*&gt;(</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">p</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> &nbsp;<=
/span><span style=3D"color: #800;" class=3D"styled-by-prettify">// (1)</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">auto</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> yp </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">static_cast</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D=
"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> Y</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">::*&gt;(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">p</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> &nbsp;</span=
><span style=3D"color: #800;" class=3D"styled-by-prettify">// (2)</span></d=
iv></code></div><div><br></div><div><br></div><div>Obviously, <i>(1) </i>sh=
ould be valid, and you describe such a round trip in the proposal, but what=
 about <i>(2)</i>?</div><div>Certainly not valid, but I don't see anything =
prohibiting it.</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_1234_1139528847.1424098737328--
------=_Part_1233_1971991114.1424098737328--

.
