220 40976 <CAFdMc-0MkQhLbiY64uSYXd8U4URzkukz3beO3Hgrx9Ni8y7rBA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Daniel Gutson <danielgutson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Pointer to pointer representation
Date: Mon, 12 Nov 2018 00:37:13 -0300
Lines: 142
Approved: news@gmane.org
Message-ID: <CAFdMc-0MkQhLbiY64uSYXd8U4URzkukz3beO3Hgrx9Ni8y7rBA@mail.gmail.com>
References: <eeb29435-11b6-424e-8434-c0aeef0977f1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="0000000000007e3361057a6f6b22"
X-Trace: blaine.gmane.org 1541993724 21035 195.159.176.226 (12 Nov 2018 03:35:24 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 12 Nov 2018 03:35:24 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDE3NBMV6UFBB6HKUPPQKGQEVKBSSFA@isocpp.org Mon Nov 12 04:35:20 2018
Return-path: <std-proposals+bncBDE3NBMV6UFBB6HKUPPQKGQEVKBSSFA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lj1-f197.google.com ([209.85.208.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDE3NBMV6UFBB6HKUPPQKGQEVKBSSFA@isocpp.org>)
	id 1gM30R-0005K3-3W
	for gclcip-std-proposals@m.gmane.org; Mon, 12 Nov 2018 04:35:19 +0100
Original-Received: by mail-lj1-f197.google.com with SMTP id s14-v6sf2308338lji.2
        for <gclcip-std-proposals@m.gmane.org>; Sun, 11 Nov 2018 19:37:29 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1541993849; cv=pass;
        d=google.com; s=arc-20160816;
        b=VkDE8OpfOxQjAExfrDqXkbPzP2+IKbbxE4Oav/f8duFujGQDlATUu/tCmAmT0F5xHW
         gr1v/i5fIb96wkaXxY6jx9DFMuUolpfkn6Vgl7r0dobXsWgieY4qdx1PlzD7jY8upfXf
         XeAfQMqPNGXvajICJ2K8h5ABKkJcXjPljtj+G7lNLNvih7f61XK2xBk4GQRJYTnBxP4H
         uJNaURHZbQrp393i9vdwiCFMKlXgRVZC+wkJ4OBBdcJ4JRdG7F07jzp2ZkhUezFcIIg5
         DpdNJM7PXbbp1UEX6Y6srFq2Qtsibtwv9jcS/0+LqFjHnsp2j0xAb1Q/BZbUURqnoykr
         QJ8Q==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:dkim-signature;
        bh=isnXVD/smz97mrA3Zn7VudskQeTt9uDq1cKQbjKHsH0=;
        b=rzaluSOrJBOOtyjYy061HjG1s2pWrJiB52bIYFnn9JDASQSwVm3OnfYB4cXPepRF49
         RQJPkL+mPkdWeSpV6T2UosyFtbxLJUbQaGnTW4fxqQOgGAbLOWWQ03t0p5+HtgJG9eKA
         aN3UN1hV/Jbi7AurQDLm4IBvW5mXNGgITgH7qtQ9+UXhmqz3ZUyObPtpVpiXExuDZHA4
         W3YJXfR3uSapZ8H3X+MGo9z8Ghg0wSXY3m/TTtu6imLIFAb2EOcxHwZ/6b2lxuUG6TOw
         TaCuFMTEzkZH/2ncQGRn6K+E370CwRyIlCvMB35VRFAco41gkTeRuax2Z2ZgPPFrwimh
         ryEw==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=vSJLZgk5;
       spf=pass (google.com: domain of danielgutson@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=danielgutson@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to: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;
        bh=isnXVD/smz97mrA3Zn7VudskQeTt9uDq1cKQbjKHsH0=;
        b=uMxGsmfLdWlgB7+de557PlrJc2ukHTjBm62Zes9ouGeFntfAoZQrjiuWX6ByqU3ASF
         OQWork+YnEnGSZ7pUgquYGDbVZFidvVaRadKARd31PXWFH56rZj2frf8KBArCvEMpo8R
         T0lDIekyDZGgsrIDzrKqH/MJleeEYXdDf/1bjxWuBV5vC98r4FRqrr/6Duu7XGb5QVA2
         YSN8REEGx7JRFhabHTFP5Ssh9edfjIChtq+Q6oO55kLsQEuPFyFq5VKv0OvlhwAnO0lD
         HpG6quh8Y3FuZfVon9X4FgKIGOl8ri9QNSTvill6QhbAdp/VZ/KCh5buSuN9tVgMDXdT
         /iyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=isnXVD/smz97mrA3Zn7VudskQeTt9uDq1cKQbjKHsH0=;
        b=DYAdnPvrHMEitLBFlwc65iTvDDpbdUBCCOV+Z6sH9bfieoyprWlnffpHuB4d7ZrH4m
         qi/RD1AGDTNDrrSwlDtuT8pFJE0Pb6E3leuycbuyyFAzINktuutCz4OqN9ZlFagfxB2G
         650ybOmrNMJm5mXiWadZ0pNVwepNowWSEmyRVKFGgnzHVG8AlU0L/oVe3k7TAumrkX/l
         r1PtdKzSz0BDkzxyTtPnP/kTk9ebrLVioHxO10yCGZXG93/xd4gPcFtxa/CtlWXsGrfV
         m3fLsfCwNdAWQQ0OblHHdqkLRDvWr+ytcM0AfeJsShLPqoYr3IlsTBAMhhdjUme5tvR8
         CF1g==
X-Gm-Message-State: AGRZ1gIKljxNCknF3PRedwiSOVIlxUZFi28D+88TOWwTvNPxQiUJCnl6
	StBytt3KGbx5Gt9znHulBY2k2A==
X-Google-Smtp-Source: AJdET5dKJFSnLPcGBP87zQPcChRr6hw/SMTEk40yeQXFsD1YtMu/6Nem63f+bwCO8HK399y88YXrfw==
X-Received: by 2002:a19:d8c6:: with SMTP id r67mr1342120lfi.3.1541993849427;
        Sun, 11 Nov 2018 19:37:29 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a19:2d4f:: with SMTP id t15ls386196lft.2.gmail; Sun, 11 Nov
 2018 19:37:27 -0800 (PST)
X-Received: by 2002:a19:8fce:: with SMTP id s75mr10024403lfk.151.1541993847796;
        Sun, 11 Nov 2018 19:37:27 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1541993847; cv=none;
        d=google.com; s=arc-20160816;
        b=VuQzjspFonq4RZXUnWG4mEvBb4ZEiPOVmVg+rGTcpFIk6fIHxyDyZu8Bf1uDPI/11G
         MCcPnLvGfCAWVIiK/Htw3lPbox8TM9MK2PdemaLc+dIL5kDowDfcZprCL/36zuWquZmZ
         VSt4hRiXi6aLk4b3/kwQydxzE5lxk7Ve9o+j30qUhGMe158lXdMbwKfSvqPdUPQR93zu
         QfIumvChnm1lb5ZTSottluLbdhhOfitwVLjI23xTSo5CmowC1pnBmeGU6jKtEY9/E5yh
         AoqveTB72IDcOGtuVHFMwzYqYLu804x3vucAL0mUpABgXWNftwq3K25ded5s8ZJoo6DU
         PWeg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature;
        bh=t/W5LZoa0go6j4vnA/H2L7mJdFDTNvEQ3D+ec+VU6qM=;
        b=W8WeQ+VXATh0M1oGHoOCRWegykT6nlBo1wryu2TiWngRnzyGTq1O1igl9UkXS6VYMT
         Ghkka+4Swgb0iU3pFa6wFh2ldh+Zov9sNmSRFkPr+YOOwxCAHAY4SNzu7VHKm9P9B17o
         qtmMY/9ldustL+i4hA4UctpE+FEJZQWy3teL0T1pE1jTuBkzPZd0GymCW2mqeFPbYCju
         +5dbrfJUBXRy00/+wyMhuXaoelNGhX4arsP5I9UaYC8YChLaSATF2DWaNg01cL7XL382
         +qazSZCebR1ysePM1AUyl5SLIdWnXuqwv94yMZAHOxxHi7GKzkac/LsdDghbly7Rbra9
         wu9Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=vSJLZgk5;
       spf=pass (google.com: domain of danielgutson@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=danielgutson@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id m10-v6sor7545290lje.8.2018.11.11.19.37.27
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Sun, 11 Nov 2018 19:37:27 -0800 (PST)
Received-SPF: pass (google.com: domain of danielgutson@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a2e:93ca:: with SMTP id p10-v6mr11630009ljh.158.1541993846942;
 Sun, 11 Nov 2018 19:37:26 -0800 (PST)
In-Reply-To: <eeb29435-11b6-424e-8434-c0aeef0977f1@isocpp.org>
X-Original-Sender: danielgutson@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=vSJLZgk5;       spf=pass
 (google.com: domain of danielgutson@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=danielgutson@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE 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-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:40976
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/40976>

--0000000000007e3361057a6f6b22
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I can think of:

template<class T, unsigned int N>
indirections_type<T, N>::type

That would represent N indirections to an object of type T (this can be
easily done with TMP).

Then a function can be provided to dereference one of those types:

template<class T, unsigned int N>
T& dereference_indirections(indirections_type<T, N>::type ptr);

Would this solve your issue?

El lun., 29 oct. 2018 4:00, <tecoberg@gmail.com> escribi=C3=B3:

> Hi,
>
> If we have a container of unitque_ptr/shared_ptr objects, to reference to
> them we can usethe follow notations:
>
> *p->FuncMember();*   //Same as *(*p).FuncMember();*
>
> but, some times I need to create a pointer to this pointer and I use to
> write the follow notation:
>
> *(*p2p)->FuncMember();*
>
> I think it will be a good idea if c++ could have a notation to this
> situations like:
>
> *p2p=3D>FuncMember() *//or
>
> *p2p+>FuncMember()* //or
>
> *p2p#>FuncMember()* //or
>
> *p2p:>FuncMember()*
>
> What do you think?
>
> I hope I helped in some 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/eeb29435-11b=
6-424e-8434-c0aeef0977f1%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/eeb29435-11=
b6-424e-8434-c0aeef0977f1%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=20
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 e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFdMc-0MkQhLbiY64uSYXd8U4URzkukz3beO3Hgrx9Ni8y7=
rBA%40mail.gmail.com.

--0000000000007e3361057a6f6b22
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">I can think of:<div dir=3D"auto"><br></div><div dir=3D"au=
to"><span style=3D"font-family:sans-serif">template&lt;class T, unsigned in=
t N&gt;</span><br></div><div dir=3D"auto">indirections_type&lt;T, N&gt;::ty=
pe</div><div dir=3D"auto"><br></div><div dir=3D"auto">That would represent =
N indirections to an object of type T (this can be easily done with TMP).</=
div><div dir=3D"auto"><br></div><div dir=3D"auto">Then a function can be pr=
ovided to dereference one of those types:</div><div dir=3D"auto"><br></div>=
<div dir=3D"auto">template&lt;class T, unsigned int N&gt;</div><div dir=3D"=
auto">T&amp; dereference_indirections(indirections_type&lt;T, N&gt;::type p=
tr);</div><div dir=3D"auto"><br></div><div dir=3D"auto">Would this solve yo=
ur issue?</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">El lun=
.., 29 oct. 2018 4:00,  &lt;<a href=3D"mailto:tecoberg@gmail.com">tecoberg@g=
mail.com</a>&gt; escribi=C3=B3:<br></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><di=
v dir=3D"ltr"><div>Hi,=C2=A0</div><div><br></div><div>If we have a containe=
r of unitque_ptr/shared_ptr objects, to reference to them we can usethe fol=
low notations:</div><div><br></div><div><b>p-&gt;FuncMember();</b>=C2=A0=C2=
=A0 //Same as <b>(*p).FuncMember();</b></div><div><br></div><div>but, some =
times I need to create a pointer to this pointer and I use to write the fol=
low notation:</div><div><br></div><div><b>(*p2p)-&gt;FuncMember();</b></div=
><div><br></div><div>I think it will be a good idea if c++ could have a not=
ation to this situations like:</div><div><br></div><div><b>p2p=3D&gt;FuncMe=
mber() </b>//or</div><div><br></div><div><b>p2p+&gt;FuncMember()</b> //or</=
div><div><br></div><div><b>p2p#&gt;FuncMember()</b> //or</div><div><br></di=
v><div><b>p2p:&gt;FuncMember()</b><br></div><div><br></div><div>What do you=
 think?</div><div><br></div><div>I hope I helped in some way.<br></div><div=
><br></div><div><br></div></div>

<p></p>

-- <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" target=3D"_=
blank" rel=3D"noreferrer">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank" rel=3D"noreferrer">std-proposals@isocpp.org</a>.<br=
>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/eeb29435-11b6-424e-8434-c0aeef0977f1%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"noreferrer">https://groups.google.com/a/isocpp.org/d/msgid/std-propo=
sals/eeb29435-11b6-424e-8434-c0aeef0977f1%40isocpp.org</a>.<br>
</blockquote></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAFdMc-0MkQhLbiY64uSYXd8U4URzkukz3beO=
3Hgrx9Ni8y7rBA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-0MkQhLbiY6=
4uSYXd8U4URzkukz3beO3Hgrx9Ni8y7rBA%40mail.gmail.com</a>.<br />

--0000000000007e3361057a6f6b22--

.
