220 29601 <945de37f-352d-008f-a29b-d354999c6c4c@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: Re: Add a "tuple_slice" function in <tuple>
Date: Wed, 30 Nov 2016 23:41:14 +0100
Lines: 53
Approved: news@gmane.org
Message-ID: <945de37f-352d-008f-a29b-d354999c6c4c@wanadoo.fr>
References: <490cad18-4302-4350-976f-2bc394a1a350@isocpp.org>
 <583F4A4F.7020708@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1480545693 12262 195.159.176.226 (30 Nov 2016 22:41:33 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 30 Nov 2016 22:41:33 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0)
 Gecko/20100101 Thunderbird/45.5.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBDNL7XAQKGQETO7D6XI@isocpp.org Wed Nov 30 23:41:25 2016
Return-path: <std-proposals+bncBDH67CONY4PBBDNL7XAQKGQETO7D6XI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDH67CONY4PBBDNL7XAQKGQETO7D6XI@isocpp.org>)
	id 1cCDZ4-00007o-UX
	for gclcip-std-proposals@m.gmane.org; Wed, 30 Nov 2016 23:41:22 +0100
Original-Received: by mail-lf0-f69.google.com with SMTP id 98sf87505455lfs.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 30 Nov 2016 14:41:18 -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:content-transfer-encoding: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=+5qs24mhO77kLiDBcHkdMZe1CDvvHTdOHq2LqCLg6CA=;
        b=LZ0re4QAAe1Sdfzf33ErJpnaGEYCMOCZtJ6ER85y9MRWvuT8myerC8IRuP/KVat2NU
         +3TmIS1z3oRUTEyA2jkFlhW3H43d99FOqPbClQYXuCgi/Jf8kmTOKdluNrdEox++Qpil
         7eJ1xWsDCd6uYUgzgmagSMI0osynSaxqXdhDLe4Z3a1Xzqb5RRij2rNYOQXPvmPu+ASG
         SAhxeI2s/xJYflG9ByUnVsB6ZFWwoR5D+cLAc7vYjS+HXYhOxvAr2+ZWlFYze05uufzP
         eAtWsSZak+PLQBTzgorOseZ+8z6mukKvg11z7x8L/KUVU4X3+2WQhmpk7EpXacC6UDxN
      
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-transfer-encoding
         :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=+5qs24mhO77kLiDBcHkdMZe1CDvvHTdOHq2LqCLg6CA=;
        b=al1Vx9O3HFWQbljCrUQfvEN1y+MXLopbUnU1wJUsShI7rAoBd4j67k+J3YbBbLBC7U
         TAmGiT1BzWMARJo9/w75VYYNfrBPbzmecWxxy+vmBI76W2L38cnhL8Iish1jhRhmOGYm
         SHnuKPgsGQWvKYZDwoI7alADR56mMSM/54sBYtbqUahFvhsNmo1gfDpL4hkjpmDD8Ta6
         1x+i8U3M8RpnDRRTSqIX9wQRBCLL8ZNL32xuOIicTPVJqXpbj1L6MCUbbvEt6Lj5uPYI
         0WvKZsLtBP4vtqj9ymI2gWNJQB/q5PdXO7JDa3HrmVZd78YHi1GzSBI/Z5OxJ68ZeMnb
  
X-Gm-Message-State: AKaTC012ziaXTHAQgd5DhjvoK4nU8lilNhKIwkts2vS7FyJrsC7KoWoobi62DGhjlDOPBQ==
X-Received: by 10.46.33.214 with SMTP id h83mr5512573lji.24.1480545678249;
        Wed, 30 Nov 2016 14:41:18 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.1.205 with SMTP id 196ls3453505wmb.23.canary-gmail; Wed, 30
 Nov 2016 14:41:17 -0800 (PST)
X-Received: by 10.28.4.200 with SMTP id 191mr2068722wme.23.1480545677304;
        Wed, 30 Nov 2016 14:41:17 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr. [80.12.242.126])
        by mx.google.com with ESMTPS id xx2si65976249wjc.251.2016.11.30.14.41.17
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Wed, 30 Nov 2016 14:41:17 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.126 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.126;
Original-Received: from imac-de-vicente-botet-escriba.home ([86.214.78.47])
	by mwinf5d27 with ME
	id ENhD1u00K11EX3q03NhDcv; Wed, 30 Nov 2016 23:41:17 +0100
X-ME-Helo: imac-de-vicente-botet-escriba.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Wed, 30 Nov 2016 23:41:17 +0100
X-ME-IP: 86.214.78.47
In-Reply-To: <583F4A4F.7020708@gmail.com>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.126 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:29601
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29601>

Le 30/11/2016 =C3=A0 22:53, Matthew Woehlke a =C3=A9crit :
> On 2016-11-30 16:04, =CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF=CF=82 =CE=
=91=CE=B8=CE=B1=CE=BD=CE=B1=CF=83=CE=AF=CE=BF=CF=85 wrote:
>> Just floating the idea before composing the complete text. I recently *b=
logged
>> <https://ngathanasiou.wordpress.com/2016/11/28/want-a-std-slice/>*about =
a
>> hypothetical tuple slice functionality (and related design consideration=
s)
>> and it seems useful & simple enough (conceptually and implementation wis=
e)
>> to be added in isolation to the Standard library (it may just have been
>> overlooked in previous versions, I couldn't find related proposals).
> If we had generalized slicing, would the proposed library function offer
> anything superior to `std::make_tuple([I1:I2]product_type...)`?
>
> (Generalized slicing would work both on *any* product type, as well as
> on parameter packs, so in at least that sense, it is superior to a
> library function that operates only on std::tuple.)
>
I agree that new algorithms should work on ProductTypes [P0327R1]. It is=20
not yet clear  to me how we would have the same syntax for ProductTypes=20
and parameter packs. I'm not saying that I'm against, just that we don't=20
have yet a clear proposal for this common access. While this could be=20
user friendly, it doesn't compose well in generic code.

I believe it is worth defining algorithms that do whatever we want=20
independently of the precise implementation and the possible language=20
evolution.

I'm considering defining some kind of ProductType views as we could have=20
Range views. product_type::slice<I1,I2>(pt) could return a lazy=20
product_type::slice_view<I1,I2, PT>. This should be more efficient,=20
needs to store a reference to the ProductType instead to a reference to=20
each one of the elements of the product type. Sorry, but I don't have=20
neither a draft paper nor an implementation to show yet.

What do you think of this suggested product type views?

BTW, would slicing [I1,I2]pt... return a pack or a product type? Or a view?

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/945de37f-352d-008f-a29b-d354999c6c4c%40wanadoo.f=
r.

.
