220 10706 <CALDL7dHTFMo_RrecdN9CxFQBpqwH24mm5nOL2erVWzbTq7vjWw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Farid Mehrabi <farid.mehrabi@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Forward declaring names
Date: Mon, 19 May 2014 19:56:40 +0430
Lines: 200
Approved: news@gmane.org
Message-ID: <CALDL7dHTFMo_RrecdN9CxFQBpqwH24mm5nOL2erVWzbTq7vjWw@mail.gmail.com>
References: <20140509221552.GA32099@sara.home> <A40FA588-CE05-429B-B8B8-1A3321092B71@gmail.com>
 <20140510164133.GA7642@sara.home> <73ba480c-9389-4da9-a8e8-d2ed02fd9905@isocpp.org>
 <20140510185607.GA9062@sara.home> <CALDL7dFu=qQGMk3jPjZxsS0-6nKFxi5hLnRoKnbvgt=xR3PKCQ@mail.gmail.com>
 <CAOfiQqn5-gHHNNx9t4wQgfNdcNeaGvXKUPGxTNz4M2zVuHBbHQ@mail.gmail.com> <CALDL7dGcVn4hy_QFP=EY0bcRL8CPJONzmORbzbyHiuQLuaN=Vg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=089e013d175a38c46b04f9c265a0
X-Trace: ger.gmane.org 1400513237 9848 80.91.229.3 (19 May 2014 15:27:17 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 19 May 2014 15:27:17 +0000 (UTC)
To: std-proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC27JR6ERAOBBSGF5CNQKGQEEX3ZIBQ@isocpp.org Mon May 19 17:27:09 2014
Return-path: <std-proposals+bncBC27JR6ERAOBBSGF5CNQKGQEEX3ZIBQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f69.google.com ([74.125.82.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC27JR6ERAOBBSGF5CNQKGQEEX3ZIBQ@isocpp.org>)
	id 1WmPSz-0000U1-Hf
	for gclcip-std-proposals@m.gmane.org; Mon, 19 May 2014 17:27:05 +0200
Original-Received: by mail-wg0-f69.google.com with SMTP id b13sf4235044wgh.0
        for <gclcip-std-proposals@m.gmane.org>; Mon, 19 May 2014 08:27:05 -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: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=ky1mygOlp8YWDZb6qZLb9hfgbSGA2h56sdbCMYKIMWc=;
        b=O5j7Ug/Vv9BEDUhxWMrfq012ecpgNjvIyN0Mr6I5kJxJ63yg3H20FMmP4uuBtHVC9x
         B4cV1zebweJT6lpLNaEdlbYQigVMzrWrsbaOqq0CmXR3I5FiowEo7CXL1zeK2E53LOMH
         XnbD8aOQFWMY0c5A+Ry6nSgMDnFBpY6jLEZkpwvi3pkMZsmlftfhv49XExtUoaNcGR/y
         q2PbXsEa9Q9mjz2Hpzkx+43avyoWi8kiO94IlQayAgD8Rc2vRIJmTTnpbNY1M/AeN0XY
         oWWbXTsUcBOx3wiEeuWkoO5zdAi4N8ud9oQuFVsJJm7WQWr+Y5vytQ23e4lRcNYXf/JJ
         F9nQ==
X-Gm-Message-State: ALoCoQn93vAZesRHacHigUvkQTwFMca4TstUZEaL8Nrh2d0yXZMNudappblNIPaC2QQmUktPF+yV
X-Received: by 10.152.36.226 with SMTP id t2mr2910693laj.1.1400513225197;
        Mon, 19 May 2014 08:27:05 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.24.234 with SMTP id x10ls493964wif.45.gmail; Mon, 19 May
 2014 08:27:04 -0700 (PDT)
X-Received: by 10.194.242.4 with SMTP id wm4mr2726785wjc.88.1400513224226;
        Mon, 19 May 2014 08:27:04 -0700 (PDT)
Original-Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [2a00:1450:400c:c03::233])
        by mx.google.com with ESMTPS id ay5si9347870wjb.4.2014.05.19.08.27.04
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 19 May 2014 08:27:04 -0700 (PDT)
Received-SPF: pass (google.com: domain of farid.mehrabi@gmail.com designates 2a00:1450:400c:c03::233 as permitted sender) client-ip=2a00:1450:400c:c03::233;
Original-Received: by mail-we0-f179.google.com with SMTP id q59so5780761wes.10
        for <std-proposals@isocpp.org>; Mon, 19 May 2014 08:27:04 -0700 (PDT)
X-Received: by 10.194.175.70 with SMTP id by6mr30465558wjc.3.1400513224031;
 Mon, 19 May 2014 08:27:04 -0700 (PDT)
Original-Received: by 10.217.123.134 with HTTP; Mon, 19 May 2014 08:26:40 -0700 (PDT)
In-Reply-To: <CALDL7dGcVn4hy_QFP=EY0bcRL8CPJONzmORbzbyHiuQLuaN=Vg@mail.gmail.com>
X-Original-Sender: farid.mehrabi@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of farid.mehrabi@gmail.com designates 2a00:1450:400c:c03::233 as
 permitted sender) smtp.mail=farid.mehrabi@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (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-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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:10706
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/10706>

--089e013d175a38c46b04f9c265a0
Content-Type: text/plain; charset=UTF-8

2014-05-19 19:38 GMT+04:30 Farid Mehrabi <farid.mehrabi@gmail.com>:

>
>
>
> 2014-05-18 23:28 GMT+04:30 Richard Smith <richard@metafoo.co.uk>:
>
>  On Sun, May 18, 2014 at 6:17 AM, Farid Mehrabi <farid.mehrabi@gmail.com>wrote:
>>
>>>
>>>
>>>
>>> 2014-05-10 23:26 GMT+04:30 Magnus Fromreide <magfr@lysator.liu.se>:
>>>
>>>> Yes, you are right, and there are also function and member pointers for
>>>> more
>>>> recent odd pointers so that kills the idea rather nicely.
>>>>
>>>
>>> I should respectfully object that this one is irrelevant. Normal
>>> pointers have the same size and representation - regarding the compilation
>>> platform.
>>>
>>
>> This is true on common platforms, but not in general, and the standard
>> has no such requirement.
>>
>>
>
> I used to consider this as the de facto  standard.
>
>  And they are implicitly statically cast-able to void*; static_cast back
>>> from this result to the original type is also well-defined behavior.
>>>
>>
>> Yes, void* must be able to represent any object pointer, but some pointer
>> types might be smaller than void*. For instance, on a word-addressable
>> machine, the ABI might say that all class types have a size that is a
>> multiple of one word, and all class pointers are the "normal" size for the
>> machine, but char* and void* are represented as a pair of (word pointer,
>> byte index).
>>
>
>
> I need a concrete practical example please. PC mainframe micro??
> A machine + OS + tool chain + relative pointer-sizes .
>
>
Even if any platform with such design exists, the forward declared type can
use pointers/references with void* layout. This is sub-optimal but yet
easily implementable.

And IMHO the 'typename' keyword is a good candidate for the purpose. It
clearly expresses the intention.

regards,
FM.
-- 
how am I supposed to end the twisted road of  your hair in the dark night??
unless the candle of your face does turn a lamp up on my way!!!

-- 

--- 
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/.

--089e013d175a38c46b04f9c265a0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"rtl"><br><div class=3D"gmail_extra"><div dir=3D"rtl"><br><br><d=
iv class=3D"gmail_quote"><div dir=3D"ltr">2014-05-19 19:38 GMT+04:30 Farid =
Mehrabi <span dir=3D"ltr">&lt;<a href=3D"mailto:farid.mehrabi@gmail.com" ta=
rget=3D"_blank">farid.mehrabi@gmail.com</a>&gt;</span>:</div>

<blockquote class=3D"gmail_quote" style=3D"margin:0 .8ex;border-left:1px #c=
cc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex"><b=
r><div class=3D"gmail_extra"><div dir=3D"ltr"><br><br><div class=3D"gmail_q=
uote">

2014-05-18 23:28 GMT+04:30 Richard Smith <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:richard@metafoo.co.uk" target=3D"_blank">richard@metafoo.co.uk</a>&gt=
;</span>:<div class=3D""><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0.8ex;border-left-wid=
th:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-ri=
ght-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;=
padding-left:1ex;padding-right:1ex">


<div class=3D"gmail_extra"><div class=3D"gmail_quote"><div>On Sun, May 18, =
2014 at 6:17 AM, Farid Mehrabi <span dir=3D"ltr">&lt;<a href=3D"mailto:fari=
d.mehrabi@gmail.com" target=3D"_blank">farid.mehrabi@gmail.com</a>&gt;</spa=
n> wrote:<br>



<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"rtl"><br><div class=3D"gmail_extra"><br><br><d=
iv class=3D"gmail_quote">


<div dir=3D"ltr">2014-05-10 23:26 GMT+04:30 Magnus Fromreide <span dir=3D"l=
tr">&lt;<a href=3D"mailto:magfr@lysator.liu.se" target=3D"_blank">magfr@lys=
ator.liu.se</a>&gt;</span>:</div>
<div>


<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div style=3D"direction:ltr">Yes, you are right, and there=
 are also function and member pointers for more</div>






<div style=3D"direction:ltr">recent odd pointers so that kills the idea rat=
her nicely.</div></blockquote></div></div><div style=3D"direction:ltr"><br>=
</div><div dir=3D"ltr">I should respectfully object that this one is irrele=
vant. Normal pointers have the same size and representation - regarding the=
 compilation platform. </div>



</div></div></blockquote><div><br></div></div><div>This is true on common p=
latforms, but not in general, and the standard has no such requirement.</di=
v><div><div>=C2=A0</div></div></div></div></blockquote><div><br></div>
</div><div>I used to consider this as the de facto =C2=A0standard.</div><di=
v class=3D""><div><br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);borde=
r-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,20=
4);border-right-style:solid;padding-left:1ex;padding-right:1ex">


<div class=3D"gmail_extra"><div class=3D"gmail_quote"><div><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;b=
order-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"=
>

<div dir=3D"rtl"><div class=3D"gmail_extra"><div dir=3D"ltr">And they are i=
mplicitly statically cast-able to void*; static_cast back from this result =
to the original type is also well-defined behavior.=C2=A0</div></div></div>=
</blockquote>



<div><br></div></div><div>Yes, void* must be able to represent any object p=
ointer, but some pointer types might be smaller than void*. For instance, o=
n a word-addressable machine, the ABI might say that all class types have a=
 size that is a multiple of one word, and all class pointers are the &quot;=
normal&quot; size for the machine, but char* and void* are represented as a=
 pair of (word pointer, byte index).</div>


</div></div></blockquote><div><br></div><div>=C2=A0</div></div><div>I need =
a concrete practical example please. PC mainframe micro??=C2=A0</div><div>A=
 machine + OS + tool chain + relative pointer-sizes .</div><div><br></div><=
/div>

</div></div></blockquote></div></div><div dir=3D"ltr"><br></div><div dir=3D=
"ltr">Even if any platform with such design exists, the forward declared ty=
pe can use pointers/references with void* layout. This is sub-optimal but y=
et easily implementable.</div>

<div dir=3D"ltr"><br></div><div dir=3D"ltr">And IMHO the &#39;typename&#39;=
 keyword is a good candidate for the purpose. It clearly expresses the inte=
ntion.</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">regards,</div><div =
dir=3D"ltr">

FM.</div>-- <br><div dir=3D"ltr">how am I supposed to end the twisted road =
of=C2=A0 your hair in the dark night??<br>unless the candle of your face do=
es turn a lamp up on my way!!!<br></div>
</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 />

--089e013d175a38c46b04f9c265a0--

.
