220 31678 <CAFk2RUZgeRfv4zYnc+y_Cw1-1onyj-725pq-UUizv8GVm8KQCQ@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Simplify virtual inheritance rules
Date: Sat, 18 Mar 2017 21:45:02 +0200
Lines: 85
Approved: news@gmane.org
Message-ID: <CAFk2RUZgeRfv4zYnc+y_Cw1-1onyj-725pq-UUizv8GVm8KQCQ@mail.gmail.com>
References: <6aa2e439-345e-4f04-8843-f38bb7b825b2@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a113cd862c0a7a1054b068711
X-Trace: blaine.gmane.org 1489866303 18811 195.159.176.226 (18 Mar 2017 19:45:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 18 Mar 2017 19:45:03 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBP44W3DAKGQEFOGKGDY@isocpp.org Sat Mar 18 20:44:59 2017
Return-path: <std-proposals+bncBC5JHI7A7ALRBP44W3DAKGQEFOGKGDY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f198.google.com ([209.85.161.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBP44W3DAKGQEFOGKGDY@isocpp.org>)
	id 1cpKHa-0004JJ-Sk
	for gclcip-std-proposals@m.gmane.org; Sat, 18 Mar 2017 20:44:59 +0100
Original-Received: by mail-yw0-f198.google.com with SMTP id u138sf317048298ywg.0
        for <gclcip-std-proposals@m.gmane.org>; Sat, 18 Mar 2017 12:45:05 -0700 (PDT)
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:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=9XNP3NoXXEuhtoZRuHTyvGR7yaQonoUjV3UPnFXKZSc=;
        b=iQakb1FXvXm1MLwVCrLXDb4GPWm6Cg6wBJeVP9Nk6CBq0PVLPe2T1PLv1+TmlgbCpG
         8KGmf8WPyvWdad3dea4R/LhG9jbJ723aAKDXnqvcTjcCBDDUSZoxj7yermYoBnDlYyYW
         b+jBH9OfXXw7QRfs1gDephO7ft6xCO5rXhN9Jx90Vm406iXeglUQnVae1lDlcJBgjLV6
         yKFIwLpLb4LO/7RzV+W96LGfwSMRN0U/0U38TAnJC6OUA1ZFxmAIOyIf6QmosYQzvxDq
         JRpXTwKbk2L3Ec556vtGjqzvpLVV4lDD5I3GqIo+tcQqJTWu2LLo3k2DPjvXdny3IZdl
         Hp9A==
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=9XNP3NoXXEuhtoZRuHTyvGR7yaQonoUjV3UPnFXKZSc=;
        b=Mq7RGPgDUs6dR1d3IbSCZ4gQ0GmmgDtB/bM+u8zLKai5daMnK1lO5uxONwc+w8cE6j
         ElkQcd7aOUeXXua+ZjxKA2rkoIusSWoSgGJxo7LKVkDHIXxWvoclCRIEDPoToGRcu7jw
         jGyD53LBVwpMc5M81PoDKozchS02XzuKvOViuf5OXCru+NR6mSJacfy4cZgnpjVyfLM2
         jW44F8P/mFvwt6ZnkbafOynyEXhovCP7NjmFZcScmPbvsIDyy7VWdC0E2wp1ZKyXXgQO
         jfvXE2XxuBzZiFI4ETrTffxWtP6WATXvAxIFRlAAZl76A+oixrDHJfGIKotv0Z3boZ3I
         Ukcw==
X-Gm-Message-State: AFeK/H3VnSfqCwbXSK+ARYFUgIrz/bDZ3B4bF/orFja6Ra6XEPwHD0n6Mpo1VDeGu2TNIQ==
X-Received: by 10.129.87.15 with SMTP id l15mr2416039ywb.0.1489866304597;
        Sat, 18 Mar 2017 12:45:04 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.89.216 with SMTP id u24ls4682975otg.40.gmail; Sat, 18 Mar
 2017 12:45:03 -0700 (PDT)
X-Received: by 10.157.54.210 with SMTP id s18mr12267605otd.245.1489866303801;
        Sat, 18 Mar 2017 12:45:03 -0700 (PDT)
Original-Received: from mail-oi0-x22f.google.com (mail-oi0-x22f.google.com. [2607:f8b0:4003:c06::22f])
        by mx.google.com with ESMTPS id f141si1816986oih.3.2017.03.18.12.45.03
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 18 Mar 2017 12:45:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:4003:c06::22f as permitted sender) client-ip=2607:f8b0:4003:c06::22f;
Original-Received: by mail-oi0-x22f.google.com with SMTP id w81so8436229oig.1
        for <std-proposals@isocpp.org>; Sat, 18 Mar 2017 12:45:03 -0700 (PDT)
X-Received: by 10.202.54.4 with SMTP id d4mr11596529oia.45.1489866302988; Sat,
 18 Mar 2017 12:45:02 -0700 (PDT)
Original-Received: by 10.157.13.22 with HTTP; Sat, 18 Mar 2017 12:45:02 -0700 (PDT)
In-Reply-To: <6aa2e439-345e-4f04-8843-f38bb7b825b2@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:4003:c06::22f as permitted
 sender) smtp.mailfrom=ville.voutilainen@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:31678
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31678>

--001a113cd862c0a7a1054b068711
Content-Type: text/plain; charset=UTF-8

On 18 March 2017 at 21:31, Denis Kotov <redradist@gmail.com> wrote:

> I want to simplify it like the following:
>
>     class ComposedDerivedDerived
>        : public ComposedDerived
>        , public NewClass
>     {
>     public:
>        ComposedDerivedDerived(std::string & str) // Here is no
> VirtualBase(str)
>        {
>
>        }
>     };
>
> *Proposal is the following:*
>    *Require to specify constructor for VirtualBase only if compiler find
> more the one path of virtual inheritance like for C3 (on diagram) or
> ComposedDerived (in code) classes*
>


ComposedDerivedDerived didn't initialize ComposedDerived in your original
code or this modified code. Also, there's no reason that
a compiler could find an initialization for a virtual base, since that
initialization may be in a separate translation unit that the compiler
doesn't
see, so this idea doesn't work at all.

-- 
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/CAFk2RUZgeRfv4zYnc%2By_Cw1-1onyj-725pq-UUizv8GVm8KQCQ%40mail.gmail.com.

--001a113cd862c0a7a1054b068711
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On 18 March 2017 at 21:31, Denis Kotov <span dir=3D"ltr">&lt;<a href=3D=
"mailto:redradist@gmail.com" target=3D"_blank">redradist@gmail.com</a>&gt;<=
/span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I want to =
simplify it like the following:<div><div><br></div><div><div>=C2=A0 =C2=A0 =
class ComposedDerivedDerived</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0: public =
ComposedDerived</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0, public NewClass</div=
><div>=C2=A0 =C2=A0 {</div><div>=C2=A0 =C2=A0 public:</div><div>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0ComposedDerivedDerived(std::<wbr>string &amp; str) // Here=
 is no VirtualBase(str)</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0{</div><div><b=
r></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0}</div><div>=C2=A0 =C2=A0 };</div><=
/div></div><div><br></div><div><span style=3D"background-color:rgb(255,255,=
0)"><b>Proposal is the following:</b></span></div><div>=C2=A0 =C2=A0<b>Requ=
ire to specify constructor for VirtualBase only if compiler find more the o=
ne path of virtual inheritance like for C3 (on diagram) or ComposedDerived =
(in code) classes</b></div></div></blockquote><div><br><br></div><div>Compo=
sedDerivedDerived didn&#39;t initialize ComposedDerived in your original co=
de or this modified code. Also, there&#39;s no reason that<br></div><div>a =
compiler could find an initialization for a virtual base, since that initia=
lization may be in a separate translation unit that the compiler doesn&#39;=
t<br></div><div>see, so this idea doesn&#39;t work at all.<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">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/CAFk2RUZgeRfv4zYnc%2By_Cw1-1onyj-725p=
q-UUizv8GVm8KQCQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUZgeRfv4z=
Ync%2By_Cw1-1onyj-725pq-UUizv8GVm8KQCQ%40mail.gmail.com</a>.<br />

--001a113cd862c0a7a1054b068711--

.
