220 25077 <b9eeb7ba-9d2a-4312-b18d-2c327f9e032f@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Cleiton Santoia <cleitonsantoia@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: "Components" template with implicitly defined
 partial specializations for all classes
Date: Tue, 8 Mar 2016 20:07:17 -0800 (PST)
Lines: 97
Approved: news@gmane.org
Message-ID: <b9eeb7ba-9d2a-4312-b18d-2c327f9e032f@isocpp.org>
References: <fd64d8c9-703d-45d8-a9b2-4b8a222c02f0@isocpp.org>
 <56D9E17F.2070202@wanadoo.fr>
 <2b0bcca0-0939-49f7-939b-4d688f8dfe34@isocpp.org>
 <324dbff9-84da-46f2-b2f3-3d9fe0cc2082@isocpp.org>
 <cc5a1d38-d1f0-4e41-9ee1-29bad95bb15e@isocpp.org> <56DA88DF.90000@wanadoo.fr>
 <c303f05a-15d4-445f-81f8-e12f67842bcc@isocpp.org>
 <7e46c46d-2e18-4cec-92c1-4f4d7fbc786b@isocpp.org>
 <d6495758-627e-434d-a867-ed473d869f47@isocpp.org>
 <39bbeb02-62b8-497b-8d65-5780a6baca97@isocpp.org>
 <05ac78e7-3d30-4a99-ad0f-a3d29497e2ff@isocpp.org>
 <2c7cb187-ad83-4ceb-af8b-1e61d4fb4d0d@isocpp.org>
 <56DD28C8.7020708@wanadoo.fr>
 <840b1f9a-be05-4454-b20d-99e2ccb3c1f1@isocpp.org>
 <390f2de7-6ab3-47cc-b76c-a7454dec5fc5@isocpp.org>
 <741522c6-22f7-441d-81ab-e1ca44e085dc@isocpp.org>
 <b9f32b39-94e0-412f-9a87-6fe118b10b02@isocpp.org>
 <74980e61-cfdf-43b1-8bb4-e56263d083bb@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_5447_117501046.1457496437857"
X-Trace: ger.gmane.org 1457496443 29809 80.91.229.3 (9 Mar 2016 04:07:23 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 9 Mar 2016 04:07:23 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCBMVWMTUUNBB56C723AKGQEXVCJ4LA@isocpp.org Wed Mar 09 05:07:23 2016
Return-path: <std-proposals+bncBCBMVWMTUUNBB56C723AKGQEXVCJ4LA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yk0-f198.google.com ([209.85.160.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCBMVWMTUUNBB56C723AKGQEXVCJ4LA@isocpp.org>)
	id 1adVP7-0006Fu-ES
	for gclcip-std-proposals@m.gmane.org; Wed, 09 Mar 2016 05:07:21 +0100
Original-Received: by mail-yk0-f198.google.com with SMTP id w83sf43973509ykf.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 08 Mar 2016 20:07:21 -0800 (PST)
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
         :x-spam-checked-in-group:list-post:list-help:list-archive:sender
         :list-subscribe:list-unsubscribe;
        bh=s7y+f0agYo+tMH20rmN+EkaPCvVHtKrBoCURmcT6VGk=;
        b=UofBn4x6Qv7eCDJvKSj6FRI09fJBVBhCTpKPIJ0LvA0G+tKCqoCnyHueHxJGwLYoc2
         XOPj6GzzKaQjLhbkQzfS7ZYrzAIiDXtmwpvZl0Zp7rWJTFUNfkMBInaQ+C4n1Yv7Vper
         b4swexIRGKeWlWwPhqY26Pn3oYXUMcFp82qhXn/0HMZef/k7HxcTwQMSQUz4bqLRt44S
         ywmouGC1+juRkS55XlGl5G9SPNrbIj01H36xbTKlTKbnbBXbY7Mg24SuV9tb9dkRROTQ
         DeTAgKqSGOMCsq9vt7yNC1vMJ3+UrKGmDmMNl1eQcdDdMFheMkzXymJeP2Y/m0MUb9sY
         GLwg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=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:sender
         :list-subscribe:list-unsubscribe;
        bh=s7y+f0agYo+tMH20rmN+EkaPCvVHtKrBoCURmcT6VGk=;
        b=1AOyHYcShqETW9BI7UG277jjoTkFG+3HsP3vx7RFNnKmKT+tzGZdXmVOj/EBrv8UYj
         sNwMAs2a7fjOHaOQAP/+Y+WEXYgt/WSfnevaxovAqrYCVWeIIj2tzZFvSm+bk2/qNNcg
         53zP7WZyKFnXLwpgY8Rd3OO3OrfdLIiRDOUjp68lzGHVcp4YOjon4pGMCjDRiI0WxZmo
         vYrzCdOe+sprsw2QNRHLXo1UxmfwaqAoi9iDBrBwZ+ziob9r/+r82ns5VfDZLi3Rk/je
         xqmM7ubtfmKjNTAzJUwlkX63senOXVEYXyXPzrugAkWXo/mSVZVHMe9SBIX5+/bBP83j
         77IQ==
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: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:sender:list-subscribe:list-unsubscribe;
        bh=s7y+f0agYo+tMH20rmN+EkaPCvVHtKrBoCURmcT6VGk=;
        b=JTMp4cEYYqLRF8ZDRCTNAtCCCGaOhGUP7/1BfHbjjcAa7DHsDmqH4im41g2KTVshTf
         txKy5rP3M1bKB89+s23U6T82KCqUB/Wq75rTzXcFy1s9EbavU1eXI9O+1+qtdTShfrSz
         s8Lv6ZnLnzmdEsEYFGsddIoQcvC7VXTE1BggKj7g0DkH8VpzAdXqaZsQYKxnP6qz9c/d
         ALPsZN1fxTlSJMpCgIBccYbCjZ+gI2z8wGmrQxFJR90KZwbDtgiaypIyxSmZ9ilW/Hug
         Bh0gTUavMnQFuGuHMuJc1n741DyDVJV5jNU469w8wZJ44HuJ4On5Pv8SRlHwsdNrmMaJ
         lEkg==
X-Gm-Message-State: AD7BkJIsln2/XZ9S0Q3epOE1Cv7C23lFq5RmNCMZWvi/8CFkyI1QaEhDDHt3N2l0brO4xQ==
X-Received: by 10.31.52.207 with SMTP id b198mr2205547vka.5.1457496440354;
        Tue, 08 Mar 2016 20:07:20 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.64.179 with SMTP id p19ls470066igs.0.gmail; Tue, 08 Mar
 2016 20:07:18 -0800 (PST)
X-Received: by 10.50.78.131 with SMTP id b3mr425751igx.5.1457496438897;
        Tue, 08 Mar 2016 20:07:18 -0800 (PST)
In-Reply-To: <74980e61-cfdf-43b1-8bb4-e56263d083bb@isocpp.org>
X-Original-Sender: cleitonsantoia@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/>
Original-Sender: std-proposals@isocpp.org
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:25077
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/25077>

------=_Part_5447_117501046.1457496437857
Content-Type: multipart/alternative; 
	boundary="----=_Part_5448_1861076731.1457496437857"

------=_Part_5448_1861076731.1457496437857
Content-Type: text/plain; charset=UTF-8

sorry, accidentally poster before ended the code

template<class C>
void get_members_from_class() {
   //something with typedef<C, is_member_object>...
}

template<class first> // the last one
void get_members_from_classes() {
    get_members_from_classe<first>();
}

template<class first, class ... Rest>
void get_members_from_classes() {
    get_members_from_classe<first>();
    get_members_from_classes<Rest>(); // recursion
}

template<class C>
void get_members_from_parent_classes() {
    get_members_from_classes< typename<C, is_base_class<C>>... >();
}


BR
CSS
 

-- 
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/b9eeb7ba-9d2a-4312-b18d-2c327f9e032f%40isocpp.org.

------=_Part_5448_1861076731.1457496437857
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">sorry, accidentally poster before ended the code<br><div><=
br></div><div><div class=3D"prettyprint" style=3D"border: 1px solid rgb(187=
, 187, 187); word-wrap: break-word; background-color: rgb(250, 250, 250);">=
<code class=3D"prettyprint"><div class=3D"subprettyprint"><div class=3D"sub=
prettyprint"><font color=3D"#660066">template&lt;class C&gt;</font></div><d=
iv class=3D"subprettyprint"><font color=3D"#660066">void get_members_from_c=
lass() {</font></div><div class=3D"subprettyprint"><font color=3D"#660066">=
=C2=A0 =C2=A0//something with typedef&lt;C, is_member_object&gt;...</font><=
/div><div class=3D"subprettyprint"><font color=3D"#660066">}</font></div><d=
iv class=3D"subprettyprint"><font color=3D"#660066"><br></font></div><div c=
lass=3D"subprettyprint"><font color=3D"#660066">template&lt;class first&gt;=
 // the last one</font></div><div class=3D"subprettyprint"><font color=3D"#=
660066">void get_members_from_classes() {</font></div><div class=3D"subpret=
typrint"><font color=3D"#660066">=C2=A0 =C2=A0 get_members_from_classe&lt;f=
irst&gt;();</font></div><div class=3D"subprettyprint"><font color=3D"#66006=
6">}</font></div><div class=3D"subprettyprint"><font color=3D"#660066"><br>=
</font></div><div class=3D"subprettyprint"><font color=3D"#660066">template=
&lt;class first, class ... Rest&gt;</font></div><div class=3D"subprettyprin=
t"><font color=3D"#660066">void get_members_from_classes() {</font></div><d=
iv class=3D"subprettyprint"><font color=3D"#660066">=C2=A0 =C2=A0 get_membe=
rs_from_classe&lt;first&gt;();</font></div><div class=3D"subprettyprint"><f=
ont color=3D"#660066">=C2=A0 =C2=A0 get_members_from_classes&lt;Rest&gt;();=
 // recursion</font></div><div class=3D"subprettyprint"><font color=3D"#660=
066">}</font></div><div class=3D"subprettyprint"><font color=3D"#660066"><b=
r></font></div><div class=3D"subprettyprint"><font color=3D"#660066">templa=
te&lt;class C&gt;</font></div><div class=3D"subprettyprint"><font color=3D"=
#660066">void get_members_from_parent_classes() {</font></div><div class=3D=
"subprettyprint"><font color=3D"#660066">=C2=A0 =C2=A0 get_members_from_cla=
sses&lt; typename&lt;C, is_base_class&lt;C&gt;&gt;... &gt;();</font></div><=
div class=3D"subprettyprint"><font color=3D"#660066">}</font></div><div><br=
></div></div></code></div><div><br></div>BR</div><div>CSS<br>=C2=A0</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/b9eeb7ba-9d2a-4312-b18d-2c327f9e032f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b9eeb7ba-9d2a-4312-b18d-2c327f9e032f=
%40isocpp.org</a>.<br />

------=_Part_5448_1861076731.1457496437857--
------=_Part_5447_117501046.1457496437857--

.
