220 30780 <63e10ea7-0878-cc71-743f-745d21dd93c8@wanadoo.fr> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Make Typedef Great Again
Date: Sun, 5 Feb 2017 15:17:48 +0100
Lines: 646
Approved: news@gmane.org
Message-ID: <63e10ea7-0878-cc71-743f-745d21dd93c8@wanadoo.fr>
References: <cfbe556f-214a-4245-b257-f746424c63f2@isocpp.org>
 <b1ae66d2-da65-bd04-6ac0-8bed1d13c5c5@wanadoo.fr>
 <fc42405f-b5de-492a-9e7e-e191a6dd975c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------CEC1AE1C0732D1A7041EAEB5"
X-Trace: blaine.gmane.org 1486304269 25586 195.159.176.226 (5 Feb 2017 14:17:49 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 5 Feb 2017 14:17:49 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0)
 Gecko/20100101 Thunderbird/45.6.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBDPI3TCAKGQE3GAQBHI@isocpp.org Sun Feb 05 15:17:45 2017
Return-path: <std-proposals+bncBDH67CONY4PBBDPI3TCAKGQE3GAQBHI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDH67CONY4PBBDPI3TCAKGQE3GAQBHI@isocpp.org>)
	id 1caNdR-0006TU-5n
	for gclcip-std-proposals@m.gmane.org; Sun, 05 Feb 2017 15:17:45 +0100
Original-Received: by mail-lf0-f70.google.com with SMTP id o12sf25174834lfg.7
        for <gclcip-std-proposals@m.gmane.org>; Sun, 05 Feb 2017 06:17:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-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=av4wRLpWXJpenvRKDDuYvFM3x0cYWI9TSTqTcT9nYpc=;
        b=OhOMaIpafdGIzUy0MC2nFuM5xQHjnpTDSbOXNWUWUyi2kTYdk6tPvu9CGgXfxdSHxY
         OUK2EUPb6oIYXQ1lfmN+scb6VXTAJ1HMRegVZa2UJdqctjkz8F2QSnJr6MPxSPL9cPmq
         DAYXNJCSfrfys+IoR5ZljhDNXUA2PN3XDYy4a061b/V1e4WcsOe8HeY+rnqmwnfJt8Me
         ko7w3IxXnFryvyYt1IMoYTPyxkbJ81iLVo3GyPL/fSDuVsDWYBQndfiGbn4wUEMoE87m
         52MFSivZgWaK7Pv9Mr1bpqRjGymMom1fuYFJvp05YFz2tIFBSFBCDVqzKsVkDb6UFM0K
         /uTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-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=av4wRLpWXJpenvRKDDuYvFM3x0cYWI9TSTqTcT9nYpc=;
        b=jLdXs5qfJ1F8bTEvDtDPdInVlIw2IbaiqytGKbtozH3a5KVo3IgzEzkULfcU9ssj4b
         +NRMaqHoE3jf2sTHIP7tNDNIQuVP/PKdU5unIhUlVxMFuR5V+1J7Z+zZmglBSnpxqBNT
         LU3k18HjizW9M/EoEs/C/KU+fPiFh3BnhzYIyZtVpAi6q6SAElGSsuXc0jX4ue2NHbCf
         b4VY8+89LhKpbJzjRTHAbPl+060sx2TLP/LaurBlKAFrHVEMQRQxcpXHcAZVv07PlAra
         5Ci3nAH+L+9fxfdckPgApyOWMOg4kobnoDZvWwOSpbQUdMkjN0J62JwnFIbBwnVqmnR2
         PReg==
X-Gm-Message-State: AIkVDXLdq8OvJ6PAfHYrQEGLGDOgll/yS4CpTNXfn5oLo5BMIO+bdOfjp3EAkQ3nH0hIrA==
X-Received: by 10.46.21.13 with SMTP id s13mr622244ljd.23.1486304270908;
        Sun, 05 Feb 2017 06:17:50 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.6.146 with SMTP id 140ls782572wmg.26.canary-gmail; Sun, 05
 Feb 2017 06:17:49 -0800 (PST)
X-Received: by 10.223.135.146 with SMTP id b18mr5389479wrb.189.1486304269731;
        Sun, 05 Feb 2017 06:17:49 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp13.smtpout.orange.fr. [80.12.242.135])
        by mx.google.com with ESMTPS id w94si32837142wrc.107.2017.02.05.06.17.49
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Sun, 05 Feb 2017 06:17:49 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.135 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.135;
Original-Received: from imac-de-vicente-botet-escriba.home ([2.11.72.89])
	by mwinf5d75 with ME
	id h2Ho1u00H1vahZu032Hofy; Sun, 05 Feb 2017 15:17:49 +0100
X-ME-Helo: imac-de-vicente-botet-escriba.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Sun, 05 Feb 2017 15:17:49 +0100
X-ME-IP: 2.11.72.89
In-Reply-To: <fc42405f-b5de-492a-9e7e-e191a6dd975c@isocpp.org>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.135 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
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:30780
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30780>

This is a multi-part message in MIME format.
--------------CEC1AE1C0732D1A7041EAEB5
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 05/02/2017 =C3=A0 13:56, TONGARI J a =C3=A9crit :
> On Sunday, February 5, 2017 at 6:41:36 PM UTC+8, Vicente J. Botet=20
> Escriba wrote:
>
>     I'm not saying the feature is not needed. I believe however that
>     the proposal needs to compare what it is currently doable.
>
>     Couldn't we use the existing language already
>
>     |
>     template<blahblah..., typename T =3D
>     |typenameMetaFunc<blahblah...>::type |>
>     T f()// yay!
>     {
>     // Use `T` from now on...
>     }
>     |
>
> In this case, it's just an alternative w/o (ab)using the template=20
> param, like how concept-lite tries to eliminate enable_if trick.
Maybe. I'd prefer to have the possibility to use the result type as e.g.=20
decltype(return).
>
>     |
>     template<blahblah..., typename
>     Base=3D|typenameMetaFunc<blahblah...>::type|>
>     classDerived:publicBase// yay!
>     {
>     // Use `Base` from now on...
>     }
>     |
>
> This does not work if "blahblah...", is actually a template parameter=20
> pack, which has to be the last one.
Right. This are the kind of cases you mush show on your proposal, the=20
cases that cannot be solved with the current languages.

>>     In parameter list:
>>     |
>>     template<blahblah...>
>>     voidf(typedefSomeTemplate<blahblah...>T a,T b);// yay!
>>     |
>>
>     I'm not sure the |blahblahcould be inferred
>
>     Do tou mean
>
>     |
>     |template<class U>
>     voidf(U, typedefSomeTemplate<U>T a,T b);
>     |
>
>
> I mean something like:
> |
> template<class...Args>
> voidf(typedefstd::tuple<Args...>T a,T b);
>
> f(std::make_tuple(1,2),std::make_tuple(3,4));//Args =3D=3D {int, int}, T=
=20
> =3D=3D std::tuple<int, int>
> |
|template<class...Args>
voidf(std::tuple<Args...>a,decltype(a) b) {
     using T =3D decltype(a);
     // make use of T
}

I believe I have an idea that could be less cryptic and reuse the=20
current alias.
What about defining some alias at the same level as the requires clasue?

|
|
template<blahblah...>
*|requires using T =3D |**|typenameMetaFunc<blahblah...>::type // let T =3D=
|*
T f()// yay!
{
// Use `T` from now on...
}
|


    |
    template<blahblah...>
    *requires using **|Base=3D|typenameMetaFunc<blahblah...>::type
    ||*|*|// let Base =3D|*|
    classDerived:publicBase// yay!
    {
    // Use `Base` from now on...
    }

    |


||template<class...Args>
||*|||requires| ||**|||using T| =3D ||*||||*std**::**tuple**<**Args**...>*
||voidf(T a,T b);

Vicente

||

--=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/63e10ea7-0878-cc71-743f-745d21dd93c8%40wanadoo.f=
r.

--------------CEC1AE1C0732D1A7041EAEB5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 05/02/2017 =C3=A0 13:56, TONGARI J a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:fc42405f-b5de-492a-9e7e-e191a6dd975c@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">On Sunday, February 5, 2017 at 6:41:36 PM UTC+8,
        Vicente J. Botet Escriba wrote:=C2=A0
        <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
          0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
          <div bgcolor=3D"#FFFFFF" text=3D"#000000">
            <div>I'm not saying the feature is not needed. I believe
              however that the proposal needs to compare what it is
              currently doable.<br>
            </div>
            <br>
            Couldn't we use the existing language already<br>
            <br>
            <div
style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);bo=
rder-style:solid;border-width:1px;word-wrap:break-word"><code>
                <div><span style=3D"color:#008">template</span><span
                    style=3D"color:#660">&lt;</span><span
                    style=3D"color:#000">blahblah</span><span
                    style=3D"color:#660">..., typename T =3D </span><span
                    style=3D"color:#660"><code><span style=3D"color:#000"><=
/span><span
                        style=3D"color:#008">typename</span><span
                        style=3D"color:#000"> </span><span
                        style=3D"color:#606">MetaFunc</span><span
                        style=3D"color:#660">&lt;</span><span
                        style=3D"color:#000">blahblah</span><span
                        style=3D"color:#660">...&gt;::</span><span
                        style=3D"color:#000">type </span></code>&gt;</span>=
<span
                    style=3D"color:#000"><br>
                  </span><span style=3D"color:#000">T f</span><span
                    style=3D"color:#660">()</span><span style=3D"color:#000=
">
                  </span><span style=3D"color:#800">// yay!</span><span
                    style=3D"color:#000"><br>
                  </span><span style=3D"color:#660">{</span><span
                    style=3D"color:#000"><br>
                    =C2=A0 =C2=A0 </span><span style=3D"color:#800">// Use =
`T` from
                    now on...</span><span style=3D"color:#000"><br>
                  </span><span style=3D"color:#660">}</span></div>
              </code></div>
            <blockquote type=3D"cite">
              <div dir=3D"ltr"> </div>
            </blockquote>
          </div>
        </blockquote>
        <div>In this case, it's just an alternative w/o (ab)using the
          template param, like how concept-lite tries to eliminate
          enable_if trick.</div>
      </div>
    </blockquote>
    Maybe. I'd prefer to have the possibility to use the result type as
    e.g. decltype(return).<br>
    <blockquote
      cite=3D"mid:fc42405f-b5de-492a-9e7e-e191a6dd975c@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">
        <div>=C2=A0</div>
        <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
          0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
          <div bgcolor=3D"#FFFFFF" text=3D"#000000">
            <div
style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);bo=
rder-style:solid;border-width:1px;word-wrap:break-word"><code>
                <div><span style=3D"color:#008">template</span><span
                    style=3D"color:#660">&lt;</span><span
                    style=3D"color:#000">blahblah</span><span
                    style=3D"color:#660">..., typename Base=3D</span><span
                    style=3D"color:#660"><code><span style=3D"color:#000"><=
/span><span
                        style=3D"color:#008">typename</span><span
                        style=3D"color:#000"> </span><span
                        style=3D"color:#606">MetaFunc</span><span
                        style=3D"color:#660">&lt;</span><span
                        style=3D"color:#000">blahblah</span><span
                        style=3D"color:#660">...&gt;::</span><span
                        style=3D"color:#000">type</span></code>&gt;</span><=
span
                    style=3D"color:#000"><br>
                  </span><span style=3D"color:#008">class</span><span
                    style=3D"color:#000"> </span><span style=3D"color:#606"=
>Derived</span><span
                    style=3D"color:#000"> </span><span style=3D"color:#660"=
>:</span><span
                    style=3D"color:#000"> </span><span style=3D"color:#000"=
></span><span
                    style=3D"color:#008">public</span><span
                    style=3D"color:#000"> </span><span style=3D"color:#000"=
></span><span
                    style=3D"color:#606">Base</span><span
                    style=3D"color:#000"> </span><span style=3D"color:#800"=
>//
                    yay!</span><span style=3D"color:#000"><br>
                  </span><span style=3D"color:#660">{</span><span
                    style=3D"color:#000"><br>
                    =C2=A0 =C2=A0 </span><span style=3D"color:#800">// Use =
`Base`
                    from now on...</span><span style=3D"color:#000"><br>
                  </span><span style=3D"color:#660">}</span></div>
              </code></div>
          </div>
        </blockquote>
        <div>=C2=A0</div>
        <div>This does not work if "<span style=3D"background-color:
            rgb(250, 250, 250); color: rgb(0, 0, 0); font-family:
            monospace;">blahblah...</span>", is actually a template
          parameter pack, which has to be the last one.</div>
      </div>
    </blockquote>
    Right. This are the kind of cases you mush show on your proposal,
    the cases that cannot be solved with the current languages.<br>
    <br>
    <blockquote
      cite=3D"mid:fc42405f-b5de-492a-9e7e-e191a6dd975c@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">
        <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
          0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
          <div bgcolor=3D"#FFFFFF" text=3D"#000000">
            <blockquote type=3D"cite">
              <div dir=3D"ltr">
                <div>In parameter list:</div>
                <div
style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);bo=
rder-style:solid;border-width:1px;word-wrap:break-word"><code>
                    <div><span style=3D"color:#008">template</span><span
                        style=3D"color:#660">&lt;</span><span
                        style=3D"color:#000">blahblah</span><span
                        style=3D"color:#660">...&gt;</span><span
                        style=3D"color:#000"><br>
                      </span><span style=3D"color:#008">void</span><span
                        style=3D"color:#000"> f</span><span
                        style=3D"color:#660">(</span><span
                        style=3D"color:#008">typedef</span><span
                        style=3D"color:#000"> </span><span
                        style=3D"color:#606">SomeTemplate</span><span
                        style=3D"color:#660">&lt;</span><span
                        style=3D"color:#000">blahblah</span><span
                        style=3D"color:#660">...&gt;</span><span
                        style=3D"color:#000"> T a</span><span
                        style=3D"color:#660">,</span><span
                        style=3D"color:#000"> T b</span><span
                        style=3D"color:#660">);</span><span
                        style=3D"color:#000"> </span><span
                        style=3D"color:#800">// yay!</span></div>
                  </code></div>
                <div><br>
                </div>
              </div>
            </blockquote>
            I'm not sure the <code><span style=3D"color:#660"></span><span
                style=3D"color:#000">blahblah</span><span
                style=3D"color:#660"> could be inferred<br>
                <br>
                Do tou mean<br>
                <br>
              </span></code><br>
            <code><span style=3D"color:#008">template</span><span
                style=3D"color:#660">&lt;class U</span><span
                style=3D"color:#660">&gt;</span><span style=3D"color:#000">=
<br>
              </span><span style=3D"color:#008">void</span><span
                style=3D"color:#000"> f</span><span style=3D"color:#660">(U=
,
              </span><span style=3D"color:#008">typedef</span><span
                style=3D"color:#000"> </span><span style=3D"color:#606">Som=
eTemplate</span><span
                style=3D"color:#660">&lt;</span><span style=3D"color:#000">=
U</span><span
                style=3D"color:#660">&gt;</span><span style=3D"color:#000">
                T a</span><span style=3D"color:#660">,</span><span
                style=3D"color:#000"> T b</span><span style=3D"color:#660">=
);<br>
              </span></code></div>
        </blockquote>
        <div><br>
        </div>
        <div>I mean something like:</div>
        <div class=3D"prettyprint" style=3D"background-color: rgb(250, 250,
          250); border-color: rgb(187, 187, 187); border-style: solid;
          border-width: 1px; word-wrap: break-word;"><code
            class=3D"prettyprint">
            <div class=3D"subprettyprint"><span style=3D"color: #008;"
                class=3D"styled-by-prettify">template</span><span
                style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</s=
pan><span
                style=3D"color: #008;" class=3D"styled-by-prettify">class</=
span><span
                style=3D"color: #660;" class=3D"styled-by-prettify">...</sp=
an><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span
                style=3D"color: #606;" class=3D"styled-by-prettify">Args</s=
pan><span
                style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</s=
pan><span
                style=3D"color: #000;" class=3D"styled-by-prettify"><br>
              </span><span style=3D"color: #008;"
                class=3D"styled-by-prettify">void</span><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> f</spa=
n><span
                style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
><span
                style=3D"color: #008;" class=3D"styled-by-prettify">typedef=
</span><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> std</s=
pan><span
                style=3D"color: #660;" class=3D"styled-by-prettify">::</spa=
n><span
                style=3D"color: #000;" class=3D"styled-by-prettify">tuple</=
span><span
                style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</s=
pan><span
                style=3D"color: #606;" class=3D"styled-by-prettify">Args</s=
pan><span
                style=3D"color: #660;" class=3D"styled-by-prettify">...&gt;=
</span><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> T a</s=
pan><span
                style=3D"color: #660;" class=3D"styled-by-prettify">,</span=
><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> T b</s=
pan><span
                style=3D"color: #660;" class=3D"styled-by-prettify">);</spa=
n><span
                style=3D"color: #000;" class=3D"styled-by-prettify"><br>
                <br>
              </span><font color=3D"#660066"><span style=3D"color: #000;"
                  class=3D"styled-by-prettify">f</span><span style=3D"color=
:
                  #660;" class=3D"styled-by-prettify">(</span><span
                  style=3D"color: #000;" class=3D"styled-by-prettify">std</=
span><span
                  style=3D"color: #660;" class=3D"styled-by-prettify">::</s=
pan><span
                  style=3D"color: #000;" class=3D"styled-by-prettify">make_=
tuple</span><span
                  style=3D"color: #660;" class=3D"styled-by-prettify">(</sp=
an><span
                  style=3D"color: #066;" class=3D"styled-by-prettify">1</sp=
an><span
                  style=3D"color: #660;" class=3D"styled-by-prettify">,</sp=
an><span
                  style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span
                  style=3D"color: #066;" class=3D"styled-by-prettify">2</sp=
an><span
                  style=3D"color: #660;" class=3D"styled-by-prettify">),</s=
pan><span
                  style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an></font><span
                style=3D"color: #000;" class=3D"styled-by-prettify">std</sp=
an><span
                style=3D"color: #660;" class=3D"styled-by-prettify">::</spa=
n><span
                style=3D"color: #000;" class=3D"styled-by-prettify">make_tu=
ple</span><span
                style=3D"color: #660;" class=3D"styled-by-prettify">(</span=
><font
                color=3D"#006666"><span style=3D"color: #066;"
                  class=3D"styled-by-prettify">3</span><span style=3D"color=
:
                  #660;" class=3D"styled-by-prettify">,</span><span
                  style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span
                  style=3D"color: #066;" class=3D"styled-by-prettify">4</sp=
an></font><span
                style=3D"color: #660;" class=3D"styled-by-prettify">));</sp=
an><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span
                style=3D"color: #800;" class=3D"styled-by-prettify">//Args
                =3D=3D {int, int}, T =3D=3D std::tuple&lt;int, int&gt;</spa=
n></div>
          </code></div>
      </div>
    </blockquote>
    <code class=3D"prettyprint"><span style=3D"color: #008;"
        class=3D"styled-by-prettify">template</span><span style=3D"color:
        #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color=
:
        #008;" class=3D"styled-by-prettify">class</span><span
        style=3D"color: #660;" class=3D"styled-by-prettify">...</span><span
        style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span
        style=3D"color: #606;" class=3D"styled-by-prettify">Args</span><spa=
n
        style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><spa=
n
        style=3D"color: #000;" class=3D"styled-by-prettify"><br>
      </span><span style=3D"color: #008;" class=3D"styled-by-prettify">void=
</span><span
        style=3D"color: #000;" class=3D"styled-by-prettify"> f</span><span
        style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span
        style=3D"color: #000;" class=3D"styled-by-prettify">std</span><span
        style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span
        style=3D"color: #000;" class=3D"styled-by-prettify">tuple</span><sp=
an
        style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><spa=
n
        style=3D"color: #606;" class=3D"styled-by-prettify">Args</span><spa=
n
        style=3D"color: #660;" class=3D"styled-by-prettify">...&gt;</span><=
span
        style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span
        style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span
        style=3D"color: #000;" class=3D"styled-by-prettify"> decltype(a) b<=
/span><span
        style=3D"color: #660;" class=3D"styled-by-prettify">) {<br>
        =C2=A0=C2=A0=C2=A0 using T =3D decltype(a);<br>
        =C2=A0=C2=A0=C2=A0 // make use of T<br>
        }<br>
        <br>
        I believe I have an idea that could be less cryptic and reuse
        the current alias. <br>
        What about defining some alias at the same level as the requires
        clasue?<br>
        <br>
      </span></code>
    <div class=3D"prettyprint" style=3D"background-color: rgb(250, 250,
      250); border-color: rgb(187, 187, 187); border-style: solid;
      border-width: 1px; word-wrap: break-word;"><code
        class=3D"prettyprint">
        <div class=3D"subprettyprint"><span style=3D"color: #008;"
            class=3D"styled-by-prettify">template</span><span
            style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span>=
<span
            style=3D"color: #000;" class=3D"styled-by-prettify">blahblah</s=
pan><span
            style=3D"color: #660;" class=3D"styled-by-prettify">...&gt;</sp=
an><span
            style=3D"color: #000;" class=3D"styled-by-prettify"><br>
          </span><b><code><span style=3D"color:#000">requires using T =3D <=
/span></code></b><b><code
              class=3D"prettyprint"><span style=3D"color: #008;"
                class=3D"styled-by-prettify">typename</span><span
                style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span
                style=3D"color: #606;" class=3D"styled-by-prettify">MetaFun=
c</span><span
                style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</s=
pan><span
                style=3D"color: #000;" class=3D"styled-by-prettify">blahbla=
h</span><span
                style=3D"color: #660;" class=3D"styled-by-prettify">...&gt;=
::</span><span
                style=3D"color: #000;" class=3D"styled-by-prettify">type //
                let T =3D</span></code></b><span style=3D"color: #008;"
            class=3D"styled-by-prettify"><br>
          </span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
T
            f</span><span style=3D"color: #660;"
            class=3D"styled-by-prettify">()</span><span style=3D"color:
            #000;" class=3D"styled-by-prettify"> </span><span
            style=3D"color: #800;" class=3D"styled-by-prettify">// yay!</sp=
an><span
            style=3D"color: #000;" class=3D"styled-by-prettify"><br>
          </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
{</span><span
            style=3D"color: #000;" class=3D"styled-by-prettify"><br>
            =C2=A0 =C2=A0 </span><span style=3D"color: #800;"
            class=3D"styled-by-prettify">// Use `T` from now on...</span><s=
pan
            style=3D"color: #000;" class=3D"styled-by-prettify"><br>
          </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
}</span></div>
      </code></div>
    <br>
    <br>
    <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
      0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
      <div bgcolor=3D"#FFFFFF" text=3D"#000000">
        <div
style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,187);bo=
rder-style:solid;border-width:1px;word-wrap:break-word"><code>
            <div><span style=3D"color:#008">template</span><span
                style=3D"color:#660">&lt;</span><span style=3D"color:#000">=
blahblah</span><span
                style=3D"color:#660">...</span><span style=3D"color:#660">&=
gt;</span><span
                style=3D"color:#000"><br>
                <b>requires using </b></span><b><code><span
                    style=3D"color:#660">Base=3D</span><span
                    style=3D"color:#660"><code><span style=3D"color:#000"><=
/span><span
                        style=3D"color:#008">typename</span><span
                        style=3D"color:#000"> </span><span
                        style=3D"color:#606">MetaFunc</span><span
                        style=3D"color:#660">&lt;</span><span
                        style=3D"color:#000">blahblah</span><span
                        style=3D"color:#660">...&gt;::</span><span
                        style=3D"color:#000">type </span></code></span></co=
de></b><code
                class=3D"prettyprint"><b><code class=3D"prettyprint"><span
                      style=3D"color: #000;" class=3D"styled-by-prettify">/=
/
                      let Base =3D</span></code></b><span style=3D"color:
                  #008;" class=3D"styled-by-prettify"></span></code><span
                style=3D"color:#008"><br>
                class</span><span style=3D"color:#000"> </span><span
                style=3D"color:#606">Derived</span><span
                style=3D"color:#000"> </span><span style=3D"color:#660">:</=
span><span
                style=3D"color:#000"> </span><span style=3D"color:#000"></s=
pan><span
                style=3D"color:#008">public</span><span style=3D"color:#000=
">
              </span><span style=3D"color:#000"></span><span
                style=3D"color:#606">Base</span><span style=3D"color:#000">
              </span><span style=3D"color:#800">// yay!</span><span
                style=3D"color:#000"><br>
              </span><span style=3D"color:#660">{</span><span
                style=3D"color:#000"><br>
                =C2=A0 =C2=A0 </span><span style=3D"color:#800">// Use `Bas=
e` from
                now on...</span><span style=3D"color:#000"><br>
              </span><span style=3D"color:#660">}<br>
                <br>
              </span></div>
          </code></div>
      </div>
    </blockquote>
    <br>
    <code class=3D"prettyprint"><span style=3D"color: #660;"
        class=3D"styled-by-prettify"><code class=3D"prettyprint"><span
            style=3D"color: #008;" class=3D"styled-by-prettify">template</s=
pan><span
            style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span>=
<span
            style=3D"color: #008;" class=3D"styled-by-prettify">class</span=
><span
            style=3D"color: #660;" class=3D"styled-by-prettify">...</span><=
span
            style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an
            style=3D"color: #606;" class=3D"styled-by-prettify">Args</span>=
<span
            style=3D"color: #660;" class=3D"styled-by-prettify">&gt;<br>
          </span></code></span></code><b><code class=3D"prettyprint"><span
          style=3D"color: #660;" class=3D"styled-by-prettify"><code
            class=3D"prettyprint"><span style=3D"color: #660;"
              class=3D"styled-by-prettify"><code><span style=3D"color:#000"=
>requires</span></code>
            </span></code></span></code></b><b><code class=3D"prettyprint">=
<span
          style=3D"color: #660;" class=3D"styled-by-prettify"><code
            class=3D"prettyprint"><span style=3D"color: #660;"
              class=3D"styled-by-prettify"><code><span style=3D"color:#000"=
>using=C2=A0
                  T</span></code> =3D </span></code></span></code></b><code
      class=3D"prettyprint"><span style=3D"color: #660;"
        class=3D"styled-by-prettify"><code class=3D"prettyprint"><span
            style=3D"color: #660;" class=3D"styled-by-prettify"><code
              class=3D"prettyprint"><span style=3D"color: #660;"
                class=3D"styled-by-prettify"><code class=3D"prettyprint"><b=
><span
                      style=3D"color: #000;" class=3D"styled-by-prettify">s=
td</span></b><b><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">:=
:</span></b><b><span
                      style=3D"color: #000;" class=3D"styled-by-prettify">t=
uple</span></b><b><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</span></b><b><span
                      style=3D"color: #606;" class=3D"styled-by-prettify">A=
rgs</span></b><span
                    style=3D"color: #660;" class=3D"styled-by-prettify"><b>=
....&gt;</b><br>
                  </span><span style=3D"color: #000;"
                    class=3D"styled-by-prettify"></span></code></span></cod=
e></span><span
            style=3D"color: #000;" class=3D"styled-by-prettify"></span><spa=
n
            style=3D"color: #008;" class=3D"styled-by-prettify">void</span>=
<span
            style=3D"color: #000;" class=3D"styled-by-prettify"> f</span><s=
pan
            style=3D"color: #660;" class=3D"styled-by-prettify">(</span><sp=
an
            style=3D"color: #000;" class=3D"styled-by-prettify">T a</span><=
span
            style=3D"color: #660;" class=3D"styled-by-prettify">,</span><sp=
an
            style=3D"color: #000;" class=3D"styled-by-prettify"> T b</span>=
<span
            style=3D"color: #660;" class=3D"styled-by-prettify">);<br>
            <br>
            Vicente<br>
            <br>
          </span></code></span></code>
  </body>
</html>

<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/63e10ea7-0878-cc71-743f-745d21dd93c8%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/63e10ea7-0878-cc71-743f-745d21dd93c8=
%40wanadoo.fr</a>.<br />

--------------CEC1AE1C0732D1A7041EAEB5--

.
