220 33548 <39572179-b3fe-bce3-3815-df3e9d0b2264@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: Proposal: underlying_cast
Date: Wed, 2 Aug 2017 23:54:09 +0200
Lines: 145
Approved: news@gmane.org
Message-ID: <39572179-b3fe-bce3-3815-df3e9d0b2264@wanadoo.fr>
References: <6a2c32ed-99b5-4cc5-86a5-ee3cc07567a3@isocpp.org>
 <2570492.NpxuI0RVu0@tjmaciei-mobl1>
 <aa4104f9-5a29-c1d9-22ac-1dfa9cad8d18@wanadoo.fr>
 <CABPJVnSrvKQPXqRPDju8PnnXv_M6+3EuPCuqMkMb9QigC-6fTQ@mail.gmail.com>
 <db80d22b-15d6-0995-fa22-3e99eb745269@wanadoo.fr>
 <CABPJVnT=J1u1HWsQG=JT8wZNi=ZkaU+5Vy9m2LJCbSBFXTsV7A@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------893A3C2320E9565A2BBC615D"
X-Trace: blaine.gmane.org 1501710857 23795 195.159.176.226 (2 Aug 2017 21:54:17 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 2 Aug 2017 21:54:17 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0)
 Gecko/20100101 Thunderbird/52.2.1
To: John McFarlane <john@mcfarlane.name>, std-proposals@isocpp.org,
 Thiago Macieira <thiago@macieira.org>
Original-X-From: std-proposals+bncBDH67CONY4PBBCEURHGAKGQE6PADDEY@isocpp.org Wed Aug 02 23:54:13 2017
Return-path: <std-proposals+bncBDH67CONY4PBBCEURHGAKGQE6PADDEY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDH67CONY4PBBCEURHGAKGQE6PADDEY@isocpp.org>)
	id 1dd1al-0005o2-Vt
	for gclcip-std-proposals@m.gmane.org; Wed, 02 Aug 2017 23:54:12 +0200
Original-Received: by mail-lf0-f71.google.com with SMTP id t20sf13612084lfe.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 02 Aug 2017 14:54:18 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501710857; cv=pass;
        d=google.com; s=arc-20160816;
        b=gjsvrY+0Im1+Q6wRwP8P5qPonqTeZJvkUGVgzdcKsEJuII3mQ/uAVyf0X9l5yLNGeN
         u0kKx37ZbVNFS1yBE5ZTpgh36p6/OKt9CFQ+RJhXti9n44iHMSme6I78BgjpvFoIrQT8
         /kgcdifz6Ctr6FTodAZ3ynhSydsvumIe64YGvs5zhHyKIhjH9EImCQy2pAyR1ALrMgaZ
         CBdmAW58XUYeXrBwACzTWYlmyWlYHeuzBo5JQSLU7uH8TG6K3j6WPhYc4swapW2SWBnm
         EYT3bzeHZUspR30VmhMTsJsH/6wz0PvhOaXLw8FaR/BqIFfDjJ8TTV7FrA5d+hOKtbDz
         GTVQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :to:subject:arc-authentication-results:arc-message-signature
         :dkim-signature:arc-authentication-results;
        bh=c0Dn1G7rQOzP0uC67oUQ9cY6DmGXurJLigMrVJxlacM=;
        b=MgMtrpX4i3qBEdfv3IAPIfMxANXUHZ0Adv5ZTJkoieIEyYeuGkNZvMsVMXiODAgpsU
         ldG4rBU2MnXJbCYouN+nNlGV3EIAhkqR8T2LGjO416fGVxuKu3hubn9qzE3TWl9/flLc
         I5lxHcRpDjjsJT5hrWTapzSEJvCMABjyHpNL15ltMrhZP+IpZEWWOSZIEGYz5lIVf+Et
         9N7XYvOC5F5+MvUc/Gugc8ELH5zDhZ2jnLgmvmgkZURIhrQQm/1cHS1+Pv3H7PdLZRb4
         xEmOIOPG3kDGs7Mi/qsZr+SwepnnBtx94DI+etxTGlzSg7ROuHJiDt9KGsioiFNSz83t
         MCWQ==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 80.12.242.128 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
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:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=c0Dn1G7rQOzP0uC67oUQ9cY6DmGXurJLigMrVJxlacM=;
        b=hc92hWy8ILmRodM5ZKG8I6/JeplP5+9LFiPvql00GkK59Fno1JELQk7Cy+V3jpBPMc
         MIci+Hrn/7CfeDJtYLeSXoZP0Ew8DpyYMQZStxg39u28EcKwl+FzVidYlimMlnpJTdmw
         R0QMm0uKgabpNkr5bvZskpaf9YDZzSHzZD1cLCbSNUT/TX8YDpKnZNKqcgkztcCIq/MR
         0E7eifV5VosRx99gBO8XZoZWkJNNOmbRlYmAyUmeoQvQmwDy/YoKW04QnFYDj1yv0gXI
         LCeTnDciucVKWHubkgFzXWvXKpWN2UfC/vI87masxKg3gmuvjbmBDqhQob3aHhKX8A33
         gSRw==
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:content-language
         :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=c0Dn1G7rQOzP0uC67oUQ9cY6DmGXurJLigMrVJxlacM=;
        b=PCRFJTjJn7tbuvb0PZZ+SCk8Y3jUcI9X9cTJEjGe+OPvprGHO0Y3HpgujC9qOa+xdV
         7HrElAroqqXT2eTYuNjizXc/76wX5+h+IwBtsQBPoa06FWkPD4PC9H3/J3jgHawhk4l2
         lUlqoHqfAMuP65FS+XxCfrfYo3YEXPAs8R1YccgSsqV2uxDxgR/TVg1sDRHr0uG6pj7p
         KL9N8KmhAnAGWaVkv8LecV2EBae4gpGEFmDrl034LG2AhvTa/yXXs3DC/kdNwF3Zvzr9
         KmRQagHl0N87Y5BmMzTaTpjvzWc7TORmX/WiNiOKvmGC5QfwifYAAkDA1s56Fxsy+BtB
         7 
X-Gm-Message-State: AIVw113nUDXQNUGTC3OTEB2MT5m5r3nFFS3VpJ/KzTz4zXUqcHSkiJen
	81c1zYyWz5J6sQ==
X-Received: by 10.46.87.4 with SMTP id l4mr3375998ljb.39.1501710857883;
        Wed, 02 Aug 2017 14:54:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.139.12 with SMTP id n12ls50892wmd.1.gmail; Wed, 02 Aug 2017
 14:54:16 -0700 (PDT)
X-Received: by 10.223.179.211 with SMTP id x19mr4999338wrd.7.1501710856192;
        Wed, 02 Aug 2017 14:54:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501710856; cv=none;
        d=google.com; s=arc-20160816;
        b=JApZggK95js4YZ98GoOVQP+K3M8L67MJnbUjW/GpsqhIr6gTy6lbTxZb46HEswDcm8
         9L2T8Q/2ur1RVMyRXzAplvgheojHMzG4RX1+TaiEZSrNkRide2Iu62Og50itPm941kHR
         19P8RvI6WadExAameUgzIxWcf3sSYhDT5oseeduVxeHwLmxrPWOIFZv79GjtOwyXImUm
         jfivTz13KZf8K6Cpkat7sdBnkIk95XMdFfUUNDGUsQza/uiFsjJiPxP3OqZSgGQK0eOG
         Mm5Ii6MNuYr0fB1EcHIQsqOQ5OnkcP7gVoyj6u9DjVsw8dQ2yvn67CGU1NED9IIJ7nYM
         wDSg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:to:subject:arc-authentication-results;
        bh=jmqZkl38Uoy96eXzlHvbQTAFJIz20a/IIDr9JfjEqLo=;
        b=uULK5eCGHacc61hFhCIkbGl94vtF6TkXfOVeUepnz5oHnUJbBmnSYmCknVZNLCXHD2
         EM1Q91aEgLWleaJy68PvkzuGUcHHAc2Qlv3iY2i9GEf255781pu89638LEsf8jwIhOSp
         E6HzhQuV32owB36J38KYsxesZir6MN/ugI+Lhuo3tt2p+0tv5gMva0YxDSL+QDS0QXCb
         XSlvXKxuwIgenX0YcEVcOI6MTjRg0lq2dvFmLZfRby2HPqKCy1Y8Vrti9A33cJh9Cphn
         QEm3N4DSKpNIuU82zaTy3/eIH4h0snVrId8Tt6IulOeiJL1qZOMpNNiLcN24HyKcgurG
         1TEQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 80.12.242.128 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
Original-Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr. [80.12.242.128])
        by mx.google.com with ESMTPS id k23si229330wrk.451.2017.08.02.14.54.16
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Wed, 02 Aug 2017 14:54:16 -0700 (PDT)
Received-SPF: neutral (google.com: 80.12.242.128 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.128;
Original-Received: from imac-de-vicente-botet-escriba.home ([86.229.176.71])
	by mwinf5d41 with ME
	id sMu91v0031YoQGN03MuAiT; Wed, 02 Aug 2017 23:54:15 +0200
X-ME-Helo: imac-de-vicente-botet-escriba.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Wed, 02 Aug 2017 23:54:15 +0200
X-ME-IP: 86.229.176.71
In-Reply-To: <CABPJVnT=J1u1HWsQG=JT8wZNi=ZkaU+5Vy9m2LJCbSBFXTsV7A@mail.gmail.com>
Content-Language: fr
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.128 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:33548
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33548>

This is a multi-part message in MIME format.
--------------893A3C2320E9565A2BBC615D
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 02/08/2017 =C3=A0 21:05, John McFarlane a =C3=A9crit :
> On Wed, Aug 2, 2017, 10:54 Vicente J. Botet Escriba=20
> <vicente.botet@wanadoo.fr <mailto:vicente.botet@wanadoo.fr>> wrote:
>
>     Le 02/08/2017 =C3=A0 17:21, John McFarlane a =C3=A9crit :
>>
>>
>>
>>     Question: If wrapped types are being considered, would anyone
>>     consider `chrono::duration::rep` to be the underlying type of
>>     `chrono::duration` or it is something else?  Because if the
>>     former, then `to_rep` from P0675 serves a similar purpose.
>     For me chrono::duration::rep is the underlying type an underlying
>     type is something that works not only for numeric types. Your
>     to_rep<T>()(v) function object is similar as
>     underlying_cast<T>(v). Just wondering why do you need a function
>     object.
>
> I'm not wed to a function object.  A requirement is that the user can=20
> customize this for their own types.
>
>
Of course.


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/39572179-b3fe-bce3-3815-df3e9d0b2264%40wanadoo.f=
r.

--------------893A3C2320E9565A2BBC615D
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div class=3D"moz-cite-prefix">Le 02/08/2017 =C3=A0 21:05, John McFarla=
ne a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite"
cite=3D"mid:CABPJVnT=3DJ1u1HWsQG=3DJT8wZNi=3DZkaU+5Vy9m2LJCbSBFXTsV7A@mail.=
gmail.com">
      <div dir=3D"ltr">On Wed, Aug 2, 2017, 10:54 Vicente J. Botet Escriba
        &lt;<a href=3D"mailto:vicente.botet@wanadoo.fr" target=3D"_blank"
          moz-do-not-send=3D"true">vicente.botet@wanadoo.fr</a>&gt; wrote:<=
br>
        <div class=3D"gmail_quote">
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text=3D"#000000" bgcolor=3D"#FFFFFF">
              <div
                class=3D"m_5414817119334568313m_8086787294418470163moz-cite=
-prefix">Le
                02/08/2017 =C3=A0 17:21, John McFarlane a =C3=A9crit=C2=A0:=
<br>
              </div>
              <blockquote type=3D"cite">
                <div dir=3D"ltr">
                  <div class=3D"gmail_quote">
                    <div dir=3D"ltr"><br>
                    </div>
                    <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text=3D"#000000" bgcolor=3D"#FFFFFF">
                        <div
class=3D"m_5414817119334568313m_8086787294418470163m_8705335493861418200moz=
-cite-prefix"><br>
                        </div>
                      </div>
                      <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
                      </div>
                    </blockquote>
                    <div text=3D"#000000" bgcolor=3D"#FFFFFF">Question: If
                      wrapped types are being considered, would anyone
                      consider `chrono::duration::rep` to be the
                      underlying type of `chrono::duration` or it is
                      something else?=C2=A0 Because if the former, then
                      `to_rep` from P0675 serves a similar purpose. <br>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <div text=3D"#000000" bgcolor=3D"#FFFFFF"> For me
              chrono::duration::rep is the underlying type an underlying
              type is something that works not only for numeric types.
              Your to_rep&lt;T&gt;()(v) function object is similar as
              underlying_cast&lt;T&gt;(v). Just wondering why do you
              need a function object.</div>
            <div text=3D"#000000" bgcolor=3D"#FFFFFF"><br>
            </div>
          </blockquote>
          <div>I'm not wed to a function object.=C2=A0 A requirement is tha=
t
            the user can customize this for their own types.<br>
          </div>
          <br>
        </div>
        <div class=3D"gmail_quote"><br>
        </div>
      </div>
    </blockquote>
    <p>Of course.</p>
    <p><br>
    </p>
    <p>Vicente<br>
    </p>
  </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/39572179-b3fe-bce3-3815-df3e9d0b2264%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/39572179-b3fe-bce3-3815-df3e9d0b2264=
%40wanadoo.fr</a>.<br />

--------------893A3C2320E9565A2BBC615D--

.
