220 5130 <851b7fad-f929-44ea-a4c8-67d026d17db6@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Jonathan Wakely <cxx@kayari.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Calling Base class construct on
 inheritance declaration
Date: Wed, 19 Jun 2013 14:15:50 -0700 (PDT)
Lines: 85
Approved: news@gmane.org
Message-ID: <851b7fad-f929-44ea-a4c8-67d026d17db6@isocpp.org>
References: <99414030-2563-46a3-a47b-dc43099dc74d@isocpp.org>
 <CAOfiQqk_8tppyP-tg4YTV_mZOpEVuCrDQsZQqDEZ=NxHn1GQkw@mail.gmail.com>
 <74139a71-2628-485f-90fe-50597de3fdf5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_3851_29945045.1371676550316"
X-Trace: ger.gmane.org 1371676551 28871 80.91.229.3 (19 Jun 2013 21:15:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 19 Jun 2013 21:15:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCMONUNYS4IRBBV7RCHAKGQE5K3HGPA@isocpp.org Wed Jun 19 23:15:53 2013
Return-path: <std-proposals+bncBCMONUNYS4IRBBV7RCHAKGQE5K3HGPA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f71.google.com ([209.85.213.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCMONUNYS4IRBBV7RCHAKGQE5K3HGPA@isocpp.org>)
	id 1UpPjM-0006nY-A4
	for gclcip-std-proposals@m.gmane.org; Wed, 19 Jun 2013 23:15:52 +0200
Original-Received: by mail-yh0-f71.google.com with SMTP id f73sf7856439yha.10
        for <gclcip-std-proposals@m.gmane.org>; Wed, 19 Jun 2013 14:15:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:date:from:to:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=qlWBmsN9NBkXk4qboUdZOGsE5MeWR6oN5HcoMDM2y3s=;
        b=SZUqytrgJlV+tHVMSyBx1QY47N5Bs9yfPh4UIKuu1YeJNxazofH82/q3tTyoCY44Pz
         QOnlvS19tZUizOtN5EJH6059Z9d6jGpYyBTFu5vUhYwpYikqGOffJkzvAX+hea7JcCkY
         hP7X2Zb1wFi+BeqFa19pA5qwWT3SNGr8d7ZEFPqxpsyxpb03fvt8hWQJdpvUwX8GXq7D
         6kmb7P+eUgnNDbFthqSHogTYon4+pZT8/qMQIAQ5W02JPtwA4y/YsG+N45IQe9t2/jKF
         U+VARzB6i09r7ppWUjfFWNWIqrS11RDSwQCLJkNiBDKgTnma1TtZ7SAjt1OxAUInHm3l
         fI7g==
X-Received: by 10.236.110.168 with SMTP id u28mr2458148yhg.32.1371676551299;
        Wed, 19 Jun 2013 14:15:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.52.40 with SMTP id q8ls469013qeo.1.gmail; Wed, 19 Jun 2013
 14:15:50 -0700 (PDT)
X-Received: by 10.49.116.132 with SMTP id jw4mr115718qeb.33.1371676550606;
        Wed, 19 Jun 2013 14:15:50 -0700 (PDT)
In-Reply-To: <74139a71-2628-485f-90fe-50597de3fdf5@isocpp.org>
X-Original-Sender: cxx@kayari.org
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5130
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5130>

------=_Part_3851_29945045.1371676550316
Content-Type: text/plain; charset=ISO-8859-1


On Wednesday, June 19, 2013 10:12:55 PM UTC+1, Jonathan Wakely wrote:
>
>
> How about a using directive at class scope, followed by a 
> brace-or-equal-init:
>
> class Derived {
>   using Base = "Derived";
>   Derived() = default;
> };
>
> class Derived {
>   using Base{"Derived"};
>   Derived() = default;
> };
>
> The brace-or-equal-init shouldn't clash with inheriting constructors or 
> using directives, right?
>

Oops, obviously I meant for Derived to actually be derived from Base:

class Derived : Base {
  using Base{"Derived"};
  Derived() = default;
};

This would *not* allow Base("Derived"), as the original proposal used, 
because that isn't a brace-or-equal-init. It might be possible to allow it, 
but would be inconsistent with non-static data member initializers.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.



------=_Part_3851_29945045.1371676550316
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br>On Wednesday, June 19, 2013 10:12:55 PM UTC+1, Jonathan Wakely wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;borde=
r-left: 1px #ccc solid;padding-left: 1ex;"><br><div>How about a using direc=
tive at class scope, followed by a brace-or-equal-init:</div><div><br></div=
><div>class Derived {</div><div>&nbsp; using Base =3D "Derived";<br></div><=
div>&nbsp; Derived() =3D default;<br></div><div>};</div><div><div><br></div=
><div>class Derived {</div><div>&nbsp; using Base{"Derived"};<br></div><div=
>&nbsp; Derived() =3D default;<br></div><div>};</div></div><div><br></div><=
div>The brace-or-equal-init shouldn't clash with inheriting constructors or=
 using directives, right?</div></blockquote><div><br></div><div>Oops, obvio=
usly I meant for Derived to actually be derived from Base:</div><div><br></=
div><div><div><div>class Derived : Base {</div><div>&nbsp; using Base{"Deri=
ved"};<br></div><div>&nbsp; Derived() =3D default;<br></div><div>};</div></=
div></div><div><br></div><div>This would *not* allow Base("Derived"), as th=
e original proposal used, because that isn't a brace-or-equal-init. It migh=
t be possible to allow it, but would be inconsistent with non-static data m=
ember initializers.</div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_3851_29945045.1371676550316--

.
