220 33241 <85d371d4-0fa1-470a-9e02-559dd5415857@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Michael Davies' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Lambda "Injection/Inheritance/Override" function
 idea proprosal.
Date: Mon, 17 Jul 2017 16:08:13 -0700 (PDT)
Lines: 285
Approved: news@gmane.org
Message-ID: <85d371d4-0fa1-470a-9e02-559dd5415857@isocpp.org>
References: <d72b32d2-6f22-45ee-97b4-05f755b97303@isocpp.org>
 <bf5cf039-c847-4de8-a08f-8660899103c9@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_943_1160982901.1500332893513"
X-Trace: blaine.gmane.org 1500332900 17272 195.159.176.226 (17 Jul 2017 23:08:20 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 17 Jul 2017 23:08:20 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCS45AVH5YKBBXUGWXFQKGQEXZCBTWQ@isocpp.org Tue Jul 18 01:08:16 2017
Return-path: <std-proposals+bncBCS45AVH5YKBBXUGWXFQKGQEXZCBTWQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f200.google.com ([209.85.192.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCS45AVH5YKBBXUGWXFQKGQEXZCBTWQ@isocpp.org>)
	id 1dXF7a-000408-2l
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Jul 2017 01:08:10 +0200
Original-Received: by mail-pf0-f200.google.com with SMTP id p1sf4464013pfl.2
        for <gclcip-std-proposals@m.gmane.org>; Mon, 17 Jul 2017 16:08:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=mnVGfYTZx2dgJQS+zKE2iVF+V4LMjsYXq/hzbsDac3Y=;
        b=NdEimvJhBExzLvHLfGWgU/oWCd+7hVMxQApuGNy4VKBYH5W2bcMuYk2AzfLlm93h0K
         wBZkmeWyifkIky9YNhrL1i65HBsfyDLA4mdXugXlvd+8sXfCcbXWKY8hlPCBz7zMuqov
         FPGmOHfmcMUChUHkz/WSTmxwBP1GLeVm9ThDjUBNyLAz9PIQE5PMMMz++L3ManqEkbiv
         YAe8a3KeOWEEyET3ZdAyTwCollKTWhYaVSjlEP/dJduWV8VvGSpzQ3+qouNHlkG9ufXz
         zxfvyBQQ+91JCZvYqH99PodPkRk3h3/CF9/4orTAJjqMxAI3K3os9FGJIrrWqcrtMm+b
         sdlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=mnVGfYTZx2dgJQS+zKE2iVF+V4LMjsYXq/hzbsDac3Y=;
        b=Yqsyn7m01Xy5paH9Tev8xffYWVDhlP7LtkHFvXcE0OccspfK8Dvaz2p9rKswNJnTHV
         gpNXsB6jv20bdzJc84es/Zm1h2XTvv+np8WMCklj/+xSeSc1AVHAvkLEpBd4OphdvdGo
         WwcbxQLTVB5n4CG6ZUPWJ67A4cNot+yBkmoH3YyHkKLzuj93v3te1vEVnFhvc8XtncEI
         Kp8Inl780HI+vITuJZM/s4UJh/MT274mfC2Sw2+epZNClnVFC+3xzPrCeFOju8REWaYd
         8e4yxFpkaZIGOtydJmlSyoTM7sb1hK5BuYCMfDn5aRK1fAlveGaeUJf+O5v3/oCsFimd
         Ekig==
X-Gm-Message-State: AIVw113MfzRqOI/GBsj3czTxRtHNkA/rrhhNRZsJCFpbcn4jqjCsLn2x
	f9tcacRv+N/UOqRm
X-Received: by 10.99.96.23 with SMTP id u23mr6391305pgb.17.1500332895342;
        Mon, 17 Jul 2017 16:08:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.122.208 with SMTP id a199ls1266789itc.5.gmail; Mon, 17 Jul
 2017 16:08:14 -0700 (PDT)
X-Received: by 10.31.77.2 with SMTP id a2mr90416vkb.5.1500332893948;
        Mon, 17 Jul 2017 16:08:13 -0700 (PDT)
In-Reply-To: <bf5cf039-c847-4de8-a08f-8660899103c9@isocpp.org>
X-Original-Sender: MichaelDavies32@googlemail.com
X-Original-From: Michael Davies <michaeldavies32@googlemail.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:33241
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33241>

------=_Part_943_1160982901.1500332893513
Content-Type: multipart/alternative; 
	boundary="----=_Part_944_1060658338.1500332893513"

------=_Part_944_1060658338.1500332893513
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Arthur,

Thanks for the response! In regards to this, I was thinking more along the=
=20
lines of treating the lambda function as if you were actually defining a=20
function definition within the class. So:

[] () {=20
m_iWin +=3D1;
std::cout << "Overloaded: " << m_iWin << '\n';
}

Would be more equivalent to treating the lambda function as if it were a=20
direct function definition:

TestOverride::winProcess(){
    m_iWin +=3D 1;
    std::cout << "Overloaded: " << m_iWin << '\n';
}

Perhaps there should be some way of defining the lambda as if it were=20
actually a function that was part of the class? Rather than those data=20
members being accessible by main() they are only accessible within the very=
=20
lambda you create rather than accessible by main().

On Monday, July 17, 2017 at 11:52:39 PM UTC+1, Arthur O'Dwyer wrote:
>
>
>
> On Monday, July 17, 2017 at 6:09:25 AM UTC-7, Michael Davies wrote:
>>
>> Hey everyone,
>>
>> I would like to hear your thoughts on an idea I've been toiling away=20
>> over. Playing around with some code I was curious if I could try to crea=
te=20
>> a small library filled with a few classes and override the default funct=
ion=20
>> behaviour of those classes. This was for test purposes so I could have a=
=20
>> similar sort of design where I work if it was useful. Through experiment=
ing=20
>> I got something like this which is honestly not ideal:
>>
>
> https://wandbox.org/permlink/B9u9orFV5Zd3L5Fi
>
> What would be more ideal, is if I could create a new function without=20
>> having to define and declare references to things within the class to ma=
ke=20
>> them available to the lambda.
>>
>
> You already can! The only problem with your existing code is that you're=
=20
> trying to refer to private data members of your class from outside the=20
> class, which is fundamentally never allowed in C++ because it would break=
=20
> encapsulation. If you want those data members to be accessible by main(),=
=20
> then you need to make them *public*, or else make main() a *friend* of=20
> your class. Here's an example with "friend":
>
> https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ
>
> <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
> The relevant snippet is:
>
> TEST.OverrideWinProcess( <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
>     [&x =3D TEST]() { <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
>         x.m_iWin +=3D 1; <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
>         std::cout << "Overloaded: " << x.m_iWin << '\n';=20
> <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
>     } <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
> ); <https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ>
>
> If you're not a *friend* of the class, then of course you can't access=20
> its private members; that's by design and will never, ever change.
>
> HTH,
> =E2=80=93Arthur
>

--=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/85d371d4-0fa1-470a-9e02-559dd5415857%40isocpp.or=
g.

------=_Part_944_1060658338.1500332893513
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Arthur,<div><br></div><div>Thanks for the response! In =
regards to this, I was thinking more along the lines of treating the lambda=
 function as if you were actually defining a function definition within the=
 class. So:<br><br><div class=3D"prettyprint" style=3D"background-color: rg=
b(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; bo=
rder-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div c=
lass=3D"subprettyprint"><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">[]</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> <br>m_iWin </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">+=3D</span><span style=3D"color: #=
066;" class=3D"styled-by-prettify">1</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>std</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">cout </span><font color=3D"#666600"><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"style=
d-by-prettify">&quot;Overloaded: &quot;</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> m_iWin </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prett=
ify">&#39;\n&#39;</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">;</span></font><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"><br></span><span style=3D"color: #660;" class=3D"styled-by-prettify">}=
</span></div></code></div><br>Would be more equivalent to treating the lamb=
da=C2=A0function as if it were a direct function definition:</div><div><br>=
</div><div><div class=3D"prettyprint" style=3D"background-color: rgb(250, 2=
50, 250); border-color: rgb(187, 187, 187); border-style: solid; border-wid=
th: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"=
subprettyprint"><span style=3D"color: rgb(102, 0, 102);"><span style=3D"col=
or: #606;" class=3D"styled-by-prettify">TestOverride</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">winProcess</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(){</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 m_iWin </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: #066;" cl=
ass=3D"styled-by-prettify">1</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>=C2=A0 =C2=A0 std</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify">cout </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">&quo=
t;Overloaded: &quot;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&lt;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
m_iWin </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt=
;&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #080;" class=3D"styled-by-prettify">&#39;\n&#39;</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">}</span></span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br></span></div></code></di=
v><br>Perhaps there should be some way of defining the lambda as if it were=
 actually a function that was part of the class? Rather than those data mem=
bers being accessible by main() they are only accessible within the very la=
mbda you create rather than accessible by main().<br><br>On Monday, July 17=
, 2017 at 11:52:39 PM UTC+1, Arthur O&#39;Dwyer wrote:<blockquote class=3D"=
gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc so=
lid;padding-left: 1ex;"><div dir=3D"ltr"><br><br>On Monday, July 17, 2017 a=
t 6:09:25 AM UTC-7, Michael Davies wrote:<blockquote class=3D"gmail_quote" =
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left=
:1ex"><div dir=3D"ltr">Hey everyone,<br><br>I would like to hear your thoug=
hts on an idea I&#39;ve been toiling away over. Playing around with some co=
de I was curious if I could try to create a small library filled with a few=
 classes and override the default function behaviour of those classes. This=
 was for test purposes so I could have a similar sort of design where I wor=
k if it was useful. Through experimenting I got something like this which i=
s honestly not ideal:<br></div></blockquote><div><br></div><div><a href=3D"=
https://wandbox.org/permlink/B9u9orFV5Zd3L5Fi" target=3D"_blank" rel=3D"nof=
ollow" onmousedown=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttp=
s%3A%2F%2Fwandbox.org%2Fpermlink%2FB9u9orFV5Zd3L5Fi\x26sa\x3dD\x26sntz\x3d1=
\x26usg\x3dAFQjCNGkWwyMO65b1G17-JmqKs9MamOkpA&#39;;return true;" onclick=3D=
"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org=
%2Fpermlink%2FB9u9orFV5Zd3L5Fi\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGkWw=
yMO65b1G17-JmqKs9MamOkpA&#39;;return true;">https://wandbox.org/permlink/<w=
br>B9u9orFV5Zd3L5Fi</a></div><div><br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr">What would be more ideal, is if I could create a =
new function without having to define and declare references to things with=
in the class to make them available to the lambda.</div></blockquote><div><=
br></div><div>You already can! The only problem with your existing code is =
that you&#39;re trying to refer to private data members of your class from =
outside the class, which is fundamentally never allowed in C++ because it w=
ould break encapsulation. If you want those data members to be accessible b=
y main(), then you need to make them <i><b>public</b></i>, or else make mai=
n() a <i><b>friend</b></i> of your class. Here&#39;s an example with &quot;=
friend&quot;:</div><div><br></div><div><a href=3D"https://wandbox.org/perml=
ink/0KlqS0oL3H3BvaaQ" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"thi=
s.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fp=
ermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Ei=
pxiqmj8qLMHhcOBFHaKA&#39;;return true;" onclick=3D"this.href=3D&#39;https:/=
/www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3=
BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&=
#39;;return true;">https://wandbox.org/permlink/<wbr>0KlqS0oL3H3BvaaQ<br></=
a></div><div><a href=3D"https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ" targ=
et=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.=
google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ=
\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;=
return true;" onclick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dh=
ttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x=
3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;"><br></a=
></div><div><div>The relevant snippet is:</div><div><br></div><font face=3D=
"courier new, monospace"><a href=3D"https://wandbox.org/permlink/0KlqS0oL3H=
3BvaaQ" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;=
https://www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0Klq=
S0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcO=
BFHaKA&#39;;return true;" onclick=3D"this.href=3D&#39;https://www.google.co=
m/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3=
dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return tr=
ue;"> TEST.OverrideWinProcess(</a><br>=C2=A0 =C2=A0=C2=A0<a href=3D"https:/=
/wandbox.org/permlink/0KlqS0oL3H3BvaaQ" target=3D"_blank" rel=3D"nofollow" =
onmousedown=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F=
%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg=
\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;" onclick=3D"this.h=
ref=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fperm=
link%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxi=
qmj8qLMHhcOBFHaKA&#39;;return true;">[&amp;x =3D TEST]() {</a><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0=C2=A0<a href=3D"https://wandbox.org/permlink/0KlqS0oL3=
H3BvaaQ" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39=
;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0Kl=
qS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhc=
OBFHaKA&#39;;return true;" onclick=3D"this.href=3D&#39;https://www.google.c=
om/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x=
3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return t=
rue;">x.m_iWin +=3D 1;</a><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0<a href=3D"h=
ttps://wandbox.org/permlink/0KlqS0oL3H3BvaaQ" target=3D"_blank" rel=3D"nofo=
llow" onmousedown=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps=
%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\=
x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;" onclick=3D"=
this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwandbox.org%=
2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy04=
5Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;">std::cout &lt;&lt; &quot;Overloa=
ded: &quot; &lt;&lt; x.m_iWin &lt;&lt; &#39;\n&#39;;</a><br>=C2=A0 =C2=A0=
=C2=A0<a href=3D"https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ" target=3D"_=
blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.google.=
com/url?q\x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\=
x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return =
true;" onclick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A=
%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26=
usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;">}</a><br><a hr=
ef=3D"https://wandbox.org/permlink/0KlqS0oL3H3BvaaQ" target=3D"_blank" rel=
=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.google.com/url?q\=
x3dhttps%3A%2F%2Fwandbox.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sn=
tz\x3d1\x26usg\x3dAFQjCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;" onc=
lick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwand=
box.org%2Fpermlink%2F0KlqS0oL3H3BvaaQ\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQ=
jCNGXy045Eipxiqmj8qLMHhcOBFHaKA&#39;;return true;"> );</a></font></div><div=
><br></div><div>If you&#39;re not a <b>friend</b> of the class, then of cou=
rse you can&#39;t access its private members; that&#39;s by design and will=
 never, ever change.</div><div><br></div><div>HTH,</div><div>=E2=80=93Arthu=
r</div></div></blockquote></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/85d371d4-0fa1-470a-9e02-559dd5415857%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/85d371d4-0fa1-470a-9e02-559dd5415857=
%40isocpp.org</a>.<br />

------=_Part_944_1060658338.1500332893513--

------=_Part_943_1160982901.1500332893513--

.
