220 26488 <99925bbf-8c85-4274-8d30-2bc640ad3900@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Peter Koch Larsen <peter.koch.larsen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Naming base-classes
Date: Wed, 29 Jun 2016 06:28:38 -0700 (PDT)
Lines: 91
Approved: news@gmane.org
Message-ID: <99925bbf-8c85-4274-8d30-2bc640ad3900@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_45_358253090.1467206918504"
X-Trace: ger.gmane.org 1467206922 19218 80.91.229.3 (29 Jun 2016 13:28:42 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 29 Jun 2016 13:28:42 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDRIBXXKZQERBB42Z65QKGQEHQ5UI6Q@isocpp.org Wed Jun 29 15:28:41 2016
Return-path: <std-proposals+bncBDRIBXXKZQERBB42Z65QKGQEHQ5UI6Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f199.google.com ([209.85.192.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDRIBXXKZQERBB42Z65QKGQEHQ5UI6Q@isocpp.org>)
	id 1bIFXl-0004Jq-8C
	for gclcip-std-proposals@m.gmane.org; Wed, 29 Jun 2016 15:28:41 +0200
Original-Received: by mail-pf0-f199.google.com with SMTP id g62sf100991319pfb.3
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 Jun 2016 06:28:40 -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: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=Ch9hmCJBY/GpBZ14m4UQYKWCFxVJCf/A+l1urdF7dKo=;
        b=uNfS/5WSjRbmUkrFH875xXwA9BZxbQKbO87C0FEFrXtcx7sRGZ6Dx3s2EX3c+pLGxm
         RuI9ka1w84iJC9dK2z12CC9IQ/WaTUMLqXMvNlhkwRIIjuuB2aevlvdvcbI/kKA1zKBI
         n15hUUZnhRI/fnlZlH0TsMhGzrd22poBrnviM1Loz7d/VWpWstKBvcuFQh9Um8oAfGNj
         EEwl6nMXiVx3S2bQvlStsfMSvk+Rixumq+DcdufoZdAAOKsZ6i+/GW+Giegec87kuRf5
         TCQ0DrmJn0OMt0Oa7QtW3WP0qApxcOPH9up36ssNHpGTcATSYlpKhKXlBKo/ViJmtPiR
         +hdA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id: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=Ch9hmCJBY/GpBZ14m4UQYKWCFxVJCf/A+l1urdF7dKo=;
        b=MmsqW4ogWF0NRs0PVhGqexHLoW0nSqjILWXIHPXJ9Gy9EIXTTot9gGHPeGjEBMzvSZ
         Uqbh10SiEREOZlnxbV61ot33yTCSsQ2Y+vtIEbgCYULXbVFg+vE36Q/x/98iEoeg9Q1h
         85j27+/0Uhul1CuZIdSqXsmVj40D3Cruy4pKLasba0VLSPwle50Xr+LEtRfyH3Jt4nM5
         1pjHIgwdn+lhsjXp8EJ9am7Jm1I4J8fOIOXWLGKNkMml9lKYv/y2XrtT19NUU8WA8j87
         i7aPr0aPiT9vw+qsSNfidAz5DheYylEcWHsHwxiqXzVPWpzUAAcpnfLLOuzdvtN64zlH
         zMjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id: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=Ch9hmCJBY/GpBZ14m4UQYKWCFxVJCf/A+l1urdF7dKo=;
        b=Mhgn5psv2QFK+SmJ24XShzJLuYRPY4nbUJZojhaR4AYALZlde42W/hB/H1zJRdpBdV
         x0v0loB7Ad0hPMywTqljUHFJ4D0UxBXa1F+ytght+mbSvfypE+0gx4cNgxlltHYeT2Vl
         tgr1ZT+NiLQB0P+nmq0RYYjOsUTqolaEsLVAP+oC3WzJJqzdUGpYPLQHCywujJu9+mvg
         QzlvHLFsMmmO5O9GPPUjSMFtM9OFXq/R9OjTcff/qBlIgKTt6KZRw7cRVWHOq4y1Kei3
         wajSzSCj0UoVpf7nc16UwWJFU2LaQibwO0aSl9yQ0GeZy6HNAe6A0Luxi7xogI3Y0Dy0
         Ge9g==
X-Gm-Message-State: ALyK8tIAxR6TMWZR8AqGMRxhyj8JZ7xsRKBpxrNxhDbtNdnqT7qCi/v8wLL5+FXj9ts+fA==
X-Received: by 10.157.1.79 with SMTP id 73mr7747006otu.47.1467206920162;
        Wed, 29 Jun 2016 06:28:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.58.214 with SMTP id h205ls3417628ioa.22.gmail; Wed, 29 Jun
 2016 06:28:39 -0700 (PDT)
X-Received: by 10.36.1.15 with SMTP id 15mr82199itk.6.1467206919356;
        Wed, 29 Jun 2016 06:28:39 -0700 (PDT)
X-Original-Sender: peter.koch.larsen@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:26488
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26488>

------=_Part_45_358253090.1467206918504
Content-Type: multipart/alternative; 
	boundary="----=_Part_46_2103583560.1467206918504"

------=_Part_46_2103583560.1467206918504
Content-Type: text/plain; charset=UTF-8

I often need to access the base-class, and this class is often templated. 
This causes minor annoyances and is a maintenance problem.

template <class T>
struct B {...};

template<class T>
struct D: B<T>
{
    using base = B<T>;
....

};

I often encounter this problem when B and D are traits-classes, providing 
information about the actual type T (where B and D might
contain information about the GUI-representation of T or how to transfer T 
using a specific protocol).

It would be nice if I could name the class e.g. like
template<class T>
struct D: base = B<T>
{
//    using base = B<T>;  Not needed anymore.
....

};

This solution looks nice to me syntax-wise, mimicking the using-directive, 
and should be rather easy to implement.

Has there been any proposals in this direction?

Best regards
Peter

-- 
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/99925bbf-8c85-4274-8d30-2bc640ad3900%40isocpp.org.

------=_Part_46_2103583560.1467206918504
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I often need to access the base-class, and this class=
 is often templated. This causes minor annoyances and is a maintenance prob=
lem.</div><div><br></div><div>template &lt;class T&gt;</div><div>struct B {=
....};</div><div><br></div><div>template&lt;class T&gt;</div><div>struct D: =
B&lt;T&gt;</div><div>{</div><div>=C2=A0=C2=A0=C2=A0 using base =3D B&lt;T&g=
t;;</div><div>...</div><div><br></div><div>};</div><div><br></div><div>I of=
ten encounter this problem when B and D are traits-classes, providing infor=
mation about the actual type T (where B and D might</div><div>contain infor=
mation about the GUI-representation of T or how to transfer T using a speci=
fic protocol).</div><div><br></div><div>It would be nice if I could name th=
e class e.g. like</div><div><div>template&lt;class T&gt;</div><div>struct D=
: base =3D B&lt;T&gt;</div><div>{</div><div>//=C2=A0=C2=A0=C2=A0 using base=
 =3D B&lt;T&gt;;=C2=A0 Not needed anymore.</div><div>...</div><div><br></di=
v><div>};</div><div><br></div><div>This solution looks nice to me syntax-wi=
se, mimicking the using-directive, and should be rather easy to implement.<=
/div><div><br></div><div>Has there been any proposals in this direction?</d=
iv><div><br></div><div>Best regards</div><div>Peter<br></div></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/99925bbf-8c85-4274-8d30-2bc640ad3900%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/99925bbf-8c85-4274-8d30-2bc640ad3900=
%40isocpp.org</a>.<br />

------=_Part_46_2103583560.1467206918504--

------=_Part_45_358253090.1467206918504--

.
