220 32783 <CAOU91OO5iXoZ1Hf=q7Ux=BuH9C_fFfUz_=xt3DWEAJbrhzOzhA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: The Proxies - A Language Feature Decoupling
 Implementations from Requirements of Polymorphism
Date: Fri, 16 Jun 2017 18:16:22 +0200
Lines: 108
Approved: news@gmane.org
Message-ID: <CAOU91OO5iXoZ1Hf=q7Ux=BuH9C_fFfUz_=xt3DWEAJbrhzOzhA@mail.gmail.com>
References: <8d79a013-fe0e-4fb6-8278-d438ae9b4c64@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c12295a32b37f0552161b0f"
X-Trace: blaine.gmane.org 1497629785 2354 195.159.176.226 (16 Jun 2017 16:16:25 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 16 Jun 2017 16:16:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD3NR2WQQ4IBBV4ISDFAKGQETZZ7ZLI@isocpp.org Fri Jun 16 18:16:21 2017
Return-path: <std-proposals+bncBD3NR2WQQ4IBBV4ISDFAKGQETZZ7ZLI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f198.google.com ([209.85.216.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD3NR2WQQ4IBBV4ISDFAKGQETZZ7ZLI@isocpp.org>)
	id 1dLtv1-0000N9-KY
	for gclcip-std-proposals@m.gmane.org; Fri, 16 Jun 2017 18:16:19 +0200
Original-Received: by mail-qt0-f198.google.com with SMTP id w1sf37868601qtg.6
        for <gclcip-std-proposals@m.gmane.org>; Fri, 16 Jun 2017 09:16:25 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1497629784; cv=pass;
        d=google.com; s=arc-20160816;
        b=0Fgx16JkzqkQ9H/OfF0AKFQGQxrYuwk5ltQ5nejR8qG0C0RyleKtf8+4gdoe8L8BRB
         6VPDbAzdxMq5omP6VqY78/u/Ufh3ylfxOHNkbWltHCELRy27ww3nKncKAGBvzIZa+pab
         FYaKobl3mwwWV6gEXPk26efJuwSOl3HQKLjkFThN1NqkltKXHIYblsqIRoVnnhEZrE6j
         P3XvgUI0SIJ9ceO8aIWB0/2L3eufoQIw2ncCBZXxHMoIrcVdpU/78Ku5BHq2dc73xiip
         awUaEU7xvF9Lh4D2yYEfXYjkujuWWlKpGTSdIl2T2Kc/IMkyD84fDX89YVkff/irVzZQ
         Gdpg==
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:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=dxkazOzTdbHeJSn3JRD+LLSQJhWNEj5fh4d/4qjGOU0=;
        b=UstdNdqnDu3U1pz0NNxksn5LThWAyR67qwmF4ef2E1Oi8q7PZlaNgB8PqYaMoSX08X
         UPiLFG2aC4tk6ZY9wwgyqKXP2ksY7Y+uSSECAv8g32PLonW21wffoNusNII3jnPCbUTJ
         7nxUBQQqOCf+gRzaZJckga7Px1HwlLNDeJQk1bn158FMMY7oPR4qgY8LjXEtz9FVuQPq
         DYuk3KlShRka+nFZdMvjc1vryMtkgB1CLFYKws3nHbH3sj5TDkvTSxDPp3NOC6aS2cG4
         UXs1gKlH6GR5Ui8hou6TTKiPEe+IdQReK+MwgoPNAoW2ppl66eAIu5eiRX9PJGqhU31C
         +z+w==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=VBAmn9Yy;
       spf=pass (google.com: domain of mjklaim@gmail.com designates 2607:f8b0:400c:c08::22f as permitted sender) smtp.mailfrom=mjklaim@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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: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;
        bh=dxkazOzTdbHeJSn3JRD+LLSQJhWNEj5fh4d/4qjGOU0=;
        b=xmnf4AfJQbtqYRBMZksF0tR9Qg20WKXTv+C+8ZNc+MAsiMd3jGOYDAxT3oecF3zSh/
         QFbm/9XLKZb/vv/HIr33Fddmkn1bNBtKStDZkwBMtuaDSyf/hc3rVYQYj0SES4/BnfEE
         eachfpRBzqxxkfDX6/aNvZQyyo++CriG8Z26NoU/FsZjiQYV3JnIQe9WvtaQOb0p1rN6
         ccdc/cpqoCT8ZSDeQJIEpWn5sWdAIUEoq9RYGYtECJQIGB6poy50MAzJpiYhvOdCDU4g
         oI7XUeE6icNMXav8i32lAS7OiiJlqMc1V17mX2dCZQuCr9gCHf6KjMT3tcLxs3uUHmiL
         ajkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=dxkazOzTdbHeJSn3JRD+LLSQJhWNEj5fh4d/4qjGOU0=;
        b=eL7b0Czl95oZU7cqrIWk2xLlYh3QH1gVpnfFsA1cB0wCxW1ajcD92WIb42d1Ib/cxI
         0K8KMi1KQ+WIwvyUYYmyfrfgra8i/9xEujvq/IIZLutSezpmfv4L+5E2XMmoMTTwiBJ1
         531ceiLfwh9iScLUgg6WyLyr2HawpXjBFjiQjlefK7Ay7E3N/HPVL3d2ZhSaONz3PkQb
         RB3s2kr6hUOVfakl/3ekFKoRBwyVGhxdsaU/W4vmGXcTb/SOJztNqX6CWoeVZbQ0osej
         OAKWA6hovRF936cllpEw6m9Hb3PW1V3qrpOm2JqXnvwAjARkpFpFLgU9oNxxihBB1OdU
         s3Lw==
X-Gm-Message-State: AKS2vOwM2J/9ToBx86AjoxBiC54ASpfHTnZpntgJF+h6EeY3KNfhLlwm
	IKMfBrrbXsMB0Ca7
X-Received: by 10.200.36.195 with SMTP id t3mr5589107qtt.57.1497629784507;
        Fri, 16 Jun 2017 09:16:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.45.110 with SMTP id v101ls1750728ota.15.gmail; Fri, 16 Jun
 2017 09:16:23 -0700 (PDT)
X-Received: by 10.31.175.194 with SMTP id y185mr6700317vke.48.1497629783409;
        Fri, 16 Jun 2017 09:16:23 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1497629783; cv=none;
        d=google.com; s=arc-20160816;
        b=UgtMz3X6jQ3dU3XKByVxOcqymbCe04357Uaywl59HuIgQfh9o8HvNHZRYwdMUbwb+0
         6IC4tTu8RN3piCY0fQ4KBJDkZr5IO9fTckRY7sl+hyUS4j5S5xuA3xZ4oeR+Bxz70y63
         429/19gSN9BNDfC4hSglQkA0v6ZR1RDMNmurVde4z8Cy8wAQGEpqP/9605ilYNSc/w1P
         x4OO60FyApDwfgJxxm5hDn3ZdjbnPgIdz5SxCQLLCAyHEIEgojpRVxtIkJhqTL5OPDdN
         t6g6a3bV0INpMGXk4kKBjS6Q/xtrNFYs7fQ2hbKls/sXml2KRt9PVUBw2BNCZXEiq6Ob
         /ycQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=lbCf241oparlc1KFNXCNbUpPnXTWgJz2pqVZuFttZ5s=;
        b=VqDRN4NlO2jdr12yKp0oTcwDPQJGrmytVquzwET67TiZZSrIK6igtjMaYnaXBYNNlQ
         10QD1r7M+pIVoDgIfLLnxvOFKbeU+58g3X5OBt3fLTWsbVBp6Wdt0dJuvi1/0fTWtLn0
         OjplEls1w2D9uCRB9uwTznkLEqne2ofEwoT4p9BuTd3/SWmr1IETFDI3FEY8OXNX91MT
         M8g8QhobFmzVsn2tslTBJarfj9zSy8S6tLv1L+LB8E9wAwOhPvGbKmOAtd9MhyZuNpn6
         VAaaj+Hw+bJ0OjlXPelQwUULQ+c+r5e76d02l0uI01SXV5c8D1rR466fO3KE4uXZSYfA
         n46Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=VBAmn9Yy;
       spf=pass (google.com: domain of mjklaim@gmail.com designates 2607:f8b0:400c:c08::22f as permitted sender) smtp.mailfrom=mjklaim@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-ua0-x22f.google.com (mail-ua0-x22f.google.com. [2607:f8b0:400c:c08::22f])
        by mx.google.com with ESMTPS id z186si886719vkg.271.2017.06.16.09.16.23
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 16 Jun 2017 09:16:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of mjklaim@gmail.com designates 2607:f8b0:400c:c08::22f as permitted sender) client-ip=2607:f8b0:400c:c08::22f;
Original-Received: by mail-ua0-x22f.google.com with SMTP id 68so28404653uas.0
        for <std-proposals@isocpp.org>; Fri, 16 Jun 2017 09:16:23 -0700 (PDT)
X-Received: by 10.176.6.105 with SMTP id f96mr7423975uaf.15.1497629782616;
 Fri, 16 Jun 2017 09:16:22 -0700 (PDT)
Original-Received: by 10.31.169.82 with HTTP; Fri, 16 Jun 2017 09:16:22 -0700 (PDT)
In-Reply-To: <8d79a013-fe0e-4fb6-8278-d438ae9b4c64@isocpp.org>
X-Original-Sender: mjklaim@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=VBAmn9Yy;       spf=pass (google.com: domain of
 mjklaim@gmail.com designates 2607:f8b0:400c:c08::22f as permitted sender)
 smtp.mailfrom=mjklaim@gmail.com;       dmarc=pass (p=NONE sp=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: <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:32783
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32783>

--94eb2c12295a32b37f0552161b0f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On 13 June 2017 at 15:49, Mingxin Wang <wmx16835vv@163.com> wrote:

> *Class template proxy*
>
> Expression "proxy<I, W>" is a well-formed type if I is a pure virtual
> class (without a virtual destructor) and W is a type meets the Wrapper
> requirements defined above.
>
> "proxy<I, W>" is MoveConstructible if W is MoveConstructible, while
> "proxy<I, W>" is CopyConstructible if W is CopyConstructible.
>
> Providing p is a value of "proxy<I, W>" and i is a pointer of I,
> "p.f(args...)" shall be a valid expression if "(*i).f(args...)" is a vali=
d
> expression, where f is any valid function name (including operator
> overloads) and "args..." is any valid combination of values of any type.
>


Could you clarify: if a system want to take anything that have the
interface described by I, how should it

    some_system.take_it_and_do_something( ??? object );

I believe this would be really too restrictive:

    some_system.take_it_and_do_something( proxy<I,W> object );

Because it would force the user code to use only one ownership strategy for
anything passed to this function.
In my experience, I want the system to ignore if it will own or not the
object, let the user decide, as long as
the proxy is usable as a normal object.
In my opinion, the fact that the real object is shared or not should not be
imposed by the system consuming the proxy.

Jo=C3=ABl Lamotte

--=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/CAOU91OO5iXoZ1Hf%3Dq7Ux%3DBuH9C_fFfUz_%3Dxt3DWEA=
JbrhzOzhA%40mail.gmail.com.

--94eb2c12295a32b37f0552161b0f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On 13 June 2017 at 15:49, Mingxin Wang <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:wmx16835vv@163.com" target=3D"_blank">wmx16835vv@163.com</a>&gt;</span>=
 wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><font siz=
e=3D"4"><b>Class template proxy</b></font></div><div><br></div><div>Express=
ion &quot;proxy&lt;I, W&gt;&quot; is a well-formed type if I is a pure virt=
ual class (without a virtual destructor) and W is a type meets the Wrapper =
requirements defined above.</div><div><br></div><div>&quot;proxy&lt;I, W&gt=
;&quot; is MoveConstructible if W is MoveConstructible, while &quot;proxy&l=
t;I, W&gt;&quot; is CopyConstructible if W is CopyConstructible.</div><div>=
<br></div><div>Providing p is a value of &quot;proxy&lt;I, W&gt;&quot; and =
i is a pointer of I, &quot;p.f(args...)&quot; shall be a valid expression i=
f &quot;(*i).f(args...)&quot; is a valid expression, where f is any valid f=
unction name (including operator overloads) and &quot;args...&quot; is any =
valid combination of values of any type.</div><div></div></blockquote></div=
><br><br></div><div class=3D"gmail_extra">Could you clarify: if a system wa=
nt to take anything that have the interface described by I, how should it=
=C2=A0</div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"=
>=C2=A0 =C2=A0 some_system.take_it_and_do_something( ??? object );</div><di=
v class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">I believe this=
 would be really too restrictive:</div><div class=3D"gmail_extra"><br></div=
><div class=3D"gmail_extra">=C2=A0 =C2=A0 some_system.take_it_and_do_someth=
ing( proxy&lt;I,W&gt; object );</div><div class=3D"gmail_extra"><br></div><=
div class=3D"gmail_extra">Because it would force the user code to use only =
one ownership strategy for anything passed to this function.</div><div clas=
s=3D"gmail_extra">In my experience, I want the system to ignore if it will =
own or not the object, let the user decide, as long as</div><div class=3D"g=
mail_extra">the proxy is usable as a normal object.</div><div class=3D"gmai=
l_extra">In my opinion, the fact that the real object is shared or not shou=
ld not be imposed by the system consuming the proxy.</div><div class=3D"gma=
il_extra"><br></div><div class=3D"gmail_extra">Jo=C3=ABl Lamotte</div><div =
class=3D"gmail_extra"><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">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/CAOU91OO5iXoZ1Hf%3Dq7Ux%3DBuH9C_fFfUz=
_%3Dxt3DWEAJbrhzOzhA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOU91OO5iX=
oZ1Hf%3Dq7Ux%3DBuH9C_fFfUz_%3Dxt3DWEAJbrhzOzhA%40mail.gmail.com</a>.<br />

--94eb2c12295a32b37f0552161b0f--

.
