220 29599 <18998acd-2c2e-713b-29d2-4874400b35b7@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nikos Athanasiou <n.g.athanasiou@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Add a "tuple_slice" function in <tuple>
Date: Thu, 1 Dec 2016 00:19:03 +0200
Lines: 41
Approved: news@gmane.org
Message-ID: <18998acd-2c2e-713b-29d2-4874400b35b7@gmail.com>
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 1480544352 13656 195.159.176.226 (30 Nov 2016 22:19:12 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 30 Nov 2016 22:19:12 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.4.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD47R7PUYILBBWVA7XAQKGQE34I3MWI@isocpp.org Wed Nov 30 23:19:08 2016
Return-path: <std-proposals+bncBD47R7PUYILBBWVA7XAQKGQE34I3MWI@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+bncBD47R7PUYILBBWVA7XAQKGQE34I3MWI@isocpp.org>)
	id 1cCDDW-0002PL-Ns
	for gclcip-std-proposals@m.gmane.org; Wed, 30 Nov 2016 23:19:06 +0100
Original-Received: by mail-lf0-f71.google.com with SMTP id g12sf47731594lfe.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 30 Nov 2016 14:19:11 -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=t7hvjNrluiTxevhf9V5Repzb43ewTNKP801JQzWBtXk=;
        b=XtD3ud3zkF/pCqyDO5w4RjPPBlqXApXbH50bl4drY6wmDtdXtvinTPRM0hJE6PFWxq
         wl9cRZe36jf5bLqznQlY4C4ZMRoSafL7a3xCSudNzCugHRNrYh+4QaQ7H1QYCBvKx3jO
         klHAnxE/JYh4XO9HDuQgqSTsg/24g/U1HiFGgcTDecs+vzbSsmcfei+sv8nQfoxEsqIK
         Apb2XCzup6f976g9dAFFxLQnkra+rI/dMmC0kZ+MHDuY5n5UYiTZfdVaVNjmSg7TI3R+
         Ev+TBvDIhMblwG/g0pU46Kgw1a2sbFpJTQBshDBtgh6xEgwmsRa1GItppYxy3+5gtd9r
      
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=t7hvjNrluiTxevhf9V5Repzb43ewTNKP801JQzWBtXk=;
        b=IgWnja4bwG7CDvfE57w8lVAI7tZLutKCQJdsgRzWKHI7u8C5Z4ndNhgYS8jGzEdQZE
         qe5dvm4XsOd3ZcyGN7DBFwbtCAXmY+kPnyU4ge/l/kWO932FxC46Beyd9J89XKfkpxQZ
         B8cqtl4hw1+zAE+RERA8WgfgxiKOi1Lep0NG1n0iE2w0xdAHaQa9y2Ci9WZRWfRmk23h
         zpowJTSB9KiCcOaWUedH8DdlvymbMXq7kFpMZO6cbE6uDPzw1T0bOz59BLJgmi0shDV/
         SjC2X9mYOiV6Fxh+PcrQth+ba5t/Hf92p2PoluLAjtMAputudzZ9tYqpaho3p2KARwGT
  
X-Gm-Message-State: AKaTC00zHi/HXmmNSKl6vVTDXC3F0g67CDP5sBakr+DjULy0t7VtEttdGLJESQqPf7AsZw==
X-Received: by 10.46.77.66 with SMTP id a63mr4629902ljb.22.1480544350977;
        Wed, 30 Nov 2016 14:19:10 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.197.14 with SMTP id v14ls3201899wmf.19.gmail; Wed, 30 Nov
 2016 14:19:06 -0800 (PST)
X-Received: by 10.194.223.70 with SMTP id qs6mr13792067wjc.124.1480544346410;
        Wed, 30 Nov 2016 14:19:06 -0800 (PST)
Original-Received: from mail-wj0-x241.google.com (mail-wj0-x241.google.com. [2a00:1450:400c:c01::241])
        by mx.google.com with ESMTPS id ld4si66030322wjb.62.2016.11.30.14.19.06
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 30 Nov 2016 14:19:06 -0800 (PST)
Received-SPF: pass (google.com: domain of n.g.athanasiou@gmail.com designates 2a00:1450:400c:c01::241 as permitted sender) client-ip=2a00:1450:400c:c01::241;
Original-Received: by mail-wj0-x241.google.com with SMTP id kp2so24170750wjc.0
        for <std-proposals@isocpp.org>; Wed, 30 Nov 2016 14:19:06 -0800 (PST)
X-Received: by 10.194.179.135 with SMTP id dg7mr30206740wjc.219.1480544345984;
        Wed, 30 Nov 2016 14:19:05 -0800 (PST)
Original-Received: from [192.168.1.5] (adsl-219.37.6.128.tellas.gr. [37.6.128.219])
        by smtp.gmail.com with ESMTPSA id l74sm10017198wmg.2.2016.11.30.14.19.04
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 30 Nov 2016 14:19:05 -0800 (PST)
In-Reply-To: <583F4A4F.7020708@gmail.com>
X-Original-Sender: N.G.athanasiou@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 n.g.athanasiou@gmail.com designates 2a00:1450:400c:c01::241 as permitted
 sender) smtp.mailfrom=n.g.athanasiou@gmail.com;       dmarc=pass (p=NONE
 dis=NONE) header.from=gmail.com
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:29599
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29599>

Please refer to the related material, the proposed function does not=20
operate only on std::tuple. It works on any type/entity that is a valid=20
argument to std::tuple_size and std::get (namely std::array and=20
std::pair) - the reason why it's bound to produce "tuple slices" is=20
described in section 3 "Design consideration". I'm by no means implying=20
this is superior to generalized slicing, but merely more simple and not=20
requiring a language extension (plus it feels like it plays well with=20
the existing tuple toolkit - it doesn't need to introduce extra machinery)


On 30/11/2016 11:53 =CE=BC=CE=BC, Matthew Woehlke wrote:
> 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.)
>

--=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/18998acd-2c2e-713b-29d2-4874400b35b7%40gmail.com=
..

.
