220 38658 <1263c0e2-9de4-4859-ba99-12fb770c93ba@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: rmbeer2@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: new feature: declare data that replaces the
 previous one, or similar situation....
Date: Thu, 14 Jun 2018 16:37:57 -0700 (PDT)
Lines: 160
Approved: news@gmane.org
Message-ID: <1263c0e2-9de4-4859-ba99-12fb770c93ba@isocpp.org>
References: <adc40bab-d824-440b-99b9-dab0ad6bd482@isocpp.org>
 <bebc25db-8a70-4f45-9694-f5e517dccbce@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_5373_748019684.1529019477671"
X-Trace: blaine.gmane.org 1529019353 12473 195.159.176.226 (14 Jun 2018 23:35:53 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 14 Jun 2018 23:35:53 +0000 (UTC)
Cc: rmbeer2@gmail.com, mihailnajdenov@gmail.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDI6L6W3SYLBBVXYRPMQKGQERQ3QAXQ@isocpp.org Fri Jun 15 01:35:48 2018
Return-path: <std-proposals+bncBDI6L6W3SYLBBVXYRPMQKGQERQ3QAXQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDI6L6W3SYLBBVXYRPMQKGQERQ3QAXQ@isocpp.org>)
	id 1fTbmO-00038L-Lv
	for gclcip-std-proposals@m.gmane.org; Fri, 15 Jun 2018 01:35:48 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id q66-v6sf5850892ywc.18
        for <gclcip-std-proposals@m.gmane.org>; Thu, 14 Jun 2018 16:38:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc: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=Lc5FmOOQATUghgXL1ktioG/YQHMajFKwLfJSjG1TyCY=;
        b=aKZ50x+MyeQJKILVzKsYKRdSyyMUB9It5lMf/Y22M+FzEfjUntAuDlVoAjA2odwXAT
         kCdN28MPgBH2APfDhCYz44ODOK3NOKc0UtJ3ST0Mq0d4iejJ9dJOJPu0+PyAciKjJgom
         m9WWN5CEd3h1bhItwtffPSZ3yoMkL/G8/bnWKPJ4XZSxMsjGtFOFwpEeH5mHcis5FU/E
         seyxOx3WkUVyzcpDF3Ghc1rsl9K8GAwqR4VsE7GCrgE42oXfEnSOLJz7HaCgD/2nJSCg
         PMkut2Nw6uey25QmeJazufgJ+cnjBF9lJ8bjjneZ27B+JGbFWfuGN1AaI5Xo0bIDkYOm
         /E7A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:cc: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=Lc5FmOOQATUghgXL1ktioG/YQHMajFKwLfJSjG1TyCY=;
        b=C/dkIs8a3CCLrNKX81dsnOMpqR13jZura45NJEJ1WjxbTKqJw2DxrrTnaIQR0rFPzs
         2r8nC5paqyCH179sJOTKjGAEzlTsRhp0xCVtzaTknWMedK8itc4Gi6XhuArh3kp8MZOa
         vvOw6kyOL9E1nmAdvokkCkEHOfAMbu8yBZBbWZhBfgYJ3igEttoc+jYSGJM6tavdSv+5
         u4zdQnBzFd4wAGih5olH+9pO3qiB5+XziF6u03Vg0wHNyKUx4KRaCxT8Ut0aBnakaNA2
         A44GbWtNhSELZXi8eZOtPktoT4yY3jAbsnh0hfyHw3IwWX/3i9fhz0kltOw5YgFfiPRk
         Icmw==
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:cc: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=Lc5FmOOQATUghgXL1ktioG/YQHMajFKwLfJSjG1TyCY=;
        b=PHLfZXMBeXMBxSxhGXbuvqS6q8uz/TXSGawE1p3rgFN7d23Y8Sk9QIk5Fsr6qX6QZI
         5RnFI8H5rKm8hW2i3m0Oc4EQNGrpMS1fnI/tdFv3bqrnu/b9YhLiGIjzj3tCG621lb0L
         MCSrfHUa3gY8QvQFGtrU+vptxy1IxkE/WrkHowMYkzylZeHHZIILS2WmLHSoAOeFfVfS
         XacJzIpX3UmVjoW9GhhNQDFlBlUiNftVIE6JnqtNYRi+BEeRwwgJeYG7jlGtcRIWjsZl
         Dw8HAKE3sUuWcjZeRAQJbMbxVI3p7WpOtz1GATaMQaPfMlVB6Ytd05j1OuM8RwwwvRL/
         VhTw==
X-Gm-Message-State: APt69E2fuCthTkoLQrm/6TTNM5nQd9h3uXpjstBajUztNbZstfinZuNs
	GZrUfrxjvT5jAmBQ7RJ9TXh+xg==
X-Google-Smtp-Source: ADUXVKLbBSkoUHKxoQFk7GkGtth9FNdsFg2h2bSqmR+uMFrK/tzSLOr3zpLXhLmFSKfpZzoBCxDTZA==
X-Received: by 2002:a81:4e45:: with SMTP id c66-v6mr1389517ywb.177.1529019479670;
        Thu, 14 Jun 2018 16:37:59 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a25:e7cd:: with SMTP id e196-v6ls2702037ybh.0.gmail; Thu, 14
 Jun 2018 16:37:58 -0700 (PDT)
X-Received: by 2002:a25:9082:: with SMTP id t2-v6mr640810ybl.1.1529019478280;
        Thu, 14 Jun 2018 16:37:58 -0700 (PDT)
In-Reply-To: <bebc25db-8a70-4f45-9694-f5e517dccbce@isocpp.org>
X-Original-Sender: rmbeer2@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:38658
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38658>

------=_Part_5373_748019684.1529019477671
Content-Type: multipart/alternative; 
	boundary="----=_Part_5374_1386542103.1529019477671"

------=_Part_5374_1386542103.1529019477671
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

It seems that nobody else says it...
With template you just broke the structure of the classes, and did not even=
=20
take into account the class "A a;". And what is the last answer? It does=20
not explain anything. In short, no answer works...

Parece que nadie mas lo comenta...
Con template simplemente acabaste de romper con la estructura de las=20
clases, y ni siquiera lo tomaste en cuenta la clase "A a;". Y en que=20
consiste la ultima respuesta? No explica nada. En fin, ninguna respuesta=20
sirve...

El martes, 12 de junio de 2018, 4:28:30 (UTC-3), mihailn...@gmail.com=20
escribi=C3=B3:
>
> *Solution 2*
>
>
> template<class T>
> class B {
> public:
>     B(int i=3D1) : a(i) { }
>     void f2() {
>         std::cout << "A:" << a.z << std::endl;
>     }
> //    virtual A a; // Use A only from B
>     T a;
> };
> class D : public B<C> {
> public:
>     D() : B<C>(3) { }
>     void f2(){
>         std::cout << "C+A:" << a.z << std::endl;
>         B::f2();
>     }
> //    virtual C a; // Use C+A only from D
> };
>
>
> *Solution 3*
>
>
> class B=20
> {
> public:
>   B(A* a_) : a(a_) { }
>   B() : a(new A(1)) { }
>   void f2() {
>    std::cout << "A:" << a->z << std::endl;
>   }
> // virtual A a; // Use A only from B
>     std::unique_ptr<A> a;
> };
>
> class D : public B=20
> {
> public:
>   D() : B(new C(3)) { }
>   void f2(){
>     std::cout << "C+A:" << a->z << std::endl;
>     B::f2();
>   }
> // virtual C a; // Use C+A only from D
> };
>
>
> *Solution 4*
>
> Develop in terms of interfaces only
>
>
>

--=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/1263c0e2-9de4-4859-ba99-12fb770c93ba%40isocpp.or=
g.

------=_Part_5374_1386542103.1529019477671
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>It seems that nobody else says it...<br></div><div>Wi=
th template you just broke the structure of the classes, and did not even t=
ake into account the class &quot;A a;&quot;. And what is the last answer? I=
t does not explain anything. In short, no answer works...<br></div><div><br=
></div><div>Parece que nadie mas lo comenta...</div><div>Con template simpl=
emente acabaste de romper con la estructura de las clases, y ni siquiera lo=
 tomaste en cuenta la clase &quot;A a;&quot;. Y en que consiste la ultima r=
espuesta? No explica nada. En fin, ninguna respuesta sirve...<br></div><br>=
El martes, 12 de junio de 2018, 4:28:30 (UTC-3), mihailn...@gmail.com escri=
bi=C3=B3:<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"><div=
><b><font face=3D"arial,sans-serif">Solution 2</font></b></div><div><font f=
ace=3D"courier new,monospace"><b></b><font face=3D"arial,sans-serif"></font=
><br></font></div><div><font face=3D"courier new,monospace"><br>template&lt=
;class T&gt;<br>class B {<br>public:<br>=C2=A0=C2=A0=C2=A0 B(int i=3D1) : a=
(i) { }<br>=C2=A0=C2=A0=C2=A0 void f2() {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 std::cout &lt;&lt; &quot;A:&quot; &lt;&lt; a.z &lt;&lt; std::e=
ndl;<br>=C2=A0=C2=A0=C2=A0 }<br>//=C2=A0=C2=A0=C2=A0 virtual A a; // Use A =
only from B<br>=C2=A0=C2=A0=C2=A0 T a;<br>};</font></div><div><font face=3D=
"courier new,monospace">class D : public B&lt;C&gt; {<br>public:<br>=C2=A0=
=C2=A0=C2=A0 D() : B&lt;C&gt;(3) { }<br>=C2=A0=C2=A0=C2=A0 void f2(){<br>=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 std::cout &lt;&lt; &quot;C+A:&qu=
ot; &lt;&lt; a.z &lt;&lt; std::endl;<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 B::f2();<br>=C2=A0=C2=A0=C2=A0 }<br>//=C2=A0=C2=A0=C2=A0 virtual =
C a; // Use C+A only from D<br>};</font></div><div><font face=3D"courier ne=
w,monospace"><br></font></div><div><font face=3D"arial,sans-serif"></font><=
b></b><br></div><div><font face=3D"arial,sans-serif"><b>Solution 3</b></fon=
t></div><div><font face=3D"courier new,monospace"><br></font></div><font fa=
ce=3D"courier new,monospace"><br><div>class B=C2=A0</div><div>{<br></div>pu=
blic:<br>=C2=A0 B(A* a_) : a(a_) { }<br>=C2=A0 B() : a(new A(1)) { }<br>=C2=
=A0 void f2() {<br>=C2=A0=C2=A0 std::cout &lt;&lt; &quot;A:&quot; &lt;&lt; =
a-&gt;z &lt;&lt; std::endl;<br>=C2=A0 }<br>//    virtual A a; // Use A only=
 from B<br>=C2=A0 =C2=A0 std::unique_ptr&lt;A&gt; a;<br><div>};</div><div><=
br></div><div>class D : public B=C2=A0</div><div>{<br></div>public:<br>=C2=
=A0 D() : B(new C(3)) { }<br>=C2=A0 void f2(){<br>=C2=A0 =C2=A0 std::cout &=
lt;&lt; &quot;C+A:&quot; &lt;&lt; a-&gt;z &lt;&lt; std::endl;<br>=C2=A0 =C2=
=A0 B::f2();<br>=C2=A0 }<br>//    virtual C a; // Use C+A only from D<br>};=
</font><div><font face=3D"arial,sans-serif"><b><br></b></font></div><div><f=
ont face=3D"arial,sans-serif"><b><br></b></font></div><div><font face=3D"ar=
ial,sans-serif"><b>Solution 4</b></font></div><div><font face=3D"courier ne=
w,monospace"><font face=3D"arial,sans-serif"></font><b></b><br></font></div=
><div><font face=3D"arial,sans-serif">Develop in terms of interfaces only</=
font></div><div><font face=3D"arial,sans-serif"><br></font></div><div><font=
 face=3D"arial,sans-serif"></font><br></div></div></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/1263c0e2-9de4-4859-ba99-12fb770c93ba%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1263c0e2-9de4-4859-ba99-12fb770c93ba=
%40isocpp.org</a>.<br />

------=_Part_5374_1386542103.1529019477671--

------=_Part_5373_748019684.1529019477671--

.
