220 31150 <dc2e850c-4cf4-450c-948c-5510ee88f622@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: inkwizytoryankes@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Domains of specialized `vector` variance
Date: Sun, 26 Feb 2017 02:25:41 -0800 (PST)
Lines: 104
Approved: news@gmane.org
Message-ID: <dc2e850c-4cf4-450c-948c-5510ee88f622@isocpp.org>
References: <38052307-8ef9-4d41-b902-826f56630c10@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_515_973129612.1488104742005"
X-Trace: blaine.gmane.org 1488104744 1886 195.159.176.226 (26 Feb 2017 10:25:44 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 26 Feb 2017 10:25:44 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDLTAGNTIBBBJW2ZLCQKGQEO6BEYYI@isocpp.org Sun Feb 26 11:25:38 2017
Return-path: <std-proposals+bncBDDLTAGNTIBBBJW2ZLCQKGQEO6BEYYI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f198.google.com ([209.85.223.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDDLTAGNTIBBBJW2ZLCQKGQEO6BEYYI@isocpp.org>)
	id 1chw1J-0008H3-KF
	for gclcip-std-proposals@m.gmane.org; Sun, 26 Feb 2017 11:25:37 +0100
Original-Received: by mail-io0-f198.google.com with SMTP id p203sf49215655ioe.5
        for <gclcip-std-proposals@m.gmane.org>; Sun, 26 Feb 2017 02:25:43 -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
         :list-subscribe:list-unsubscribe;
        bh=Gncoz7IKnin4lVM4cDthgSfSBD4cq4iIu06+Y2bGwsY=;
        b=IzmNp8BvGabRBWwgHbL9QNl5UIDLmfzhdu4Z1nXiUmWICS4oYnotInEo14qiB1Dj8d
         Z3P1ujWQK2WP3G3bhbAvoMyAXTq9To/NwCdxA56DZhK6OsdDCHuF+Ngc+ccvoBB5Ss8z
         PBndSs7iOe7HeFPnpKwVSfAvGml183ok3C7PtCAMASByd80k84rJK6KqoDr67igiQQW3
         JDRiyplXQOEasB4qwy1opUAEjtbh0ufD5JyZ94ly2eOt+FXsXAcLTREZ/hnGwJDRvGlU
         qKpWEbPACebab3GT89icN8h3ehptcru6zoR4obukumfSYOfo5O3momjjUW3/GVM3mbJy
         aBcA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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
         :list-subscribe:list-unsubscribe;
        bh=Gncoz7IKnin4lVM4cDthgSfSBD4cq4iIu06+Y2bGwsY=;
        b=W6NQhaKdTobfH4FlJPvHsECYEd9y8fn9g7It9Jic0xfyhQmF9us9T2UEseVSNC8NYp
         IZpGRGkAiv3u7dRDRQWCsG2s7fBQ7/1ATECCgL0RYQh6w02xZl0n6qk+RECqBP1Uw0EX
         cxPJ+6lZ4fzoiJZNO9q6zzBkXi/DP3ISfxVuBVhnBeTzh6fMrvslVQZiteXV2/ITP3GW
         TVAW72xmMpLKxEHfHmSjw1Ry8XvhaPk54iJRxjghrMShhckQCaA7b+WX5S02YgY1PShA
         GRF9lg/4FrLVzBlJ1WwtFsswpMLbbOVhV0zk2Y3QFtVBzbp4r4NWGHyPg2vGVzDWSohF
         49lA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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:list-subscribe:list-unsubscribe;
        bh=Gncoz7IKnin4lVM4cDthgSfSBD4cq4iIu06+Y2bGwsY=;
        b=V2f/uaiVCzQ1WZmJaqwLp8le39HDksook/9hpgIKW6fg7kvMaGcw2LWCjQ/E9FCLrb
         63kBRpXpC4x231/7DBY5nfAFmDxlKJJkg0NBqbQCiWRrDBH1cylZmkMMwlDiE69khlCY
         PwJclpKNg+PWXNQqVv8Ke1PX9Uz5z9sE7ic/PJNG41suVZNd2Oez44PTC4DBFoFZ3WKc
         7siExoPzceDsyKyf8Yv5ZEeQVTsoRS4XLr1F4hyB8fE56ctfVJalS4xDBIFwDAWJXyxK
         6uv8wIm/FRunk6YU32X7bvtQ1CveUhUrYvuE+IVVRSzX46yAqXsyY92iDeANJS60j51h
         L4Aw==
X-Gm-Message-State: AMke39kk1q5gNvRw/qhUmoax/B+KrC4H7TnVsdaez4FGOD8XpzwRel0SRDbCCFMlg1se1w==
X-Received: by 10.107.18.5 with SMTP id a5mr4112200ioj.7.1488104743326;
        Sun, 26 Feb 2017 02:25:43 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.5.176 with SMTP id 45ls1991857otd.37.gmail; Sun, 26 Feb
 2017 02:25:42 -0800 (PST)
X-Received: by 10.157.4.129 with SMTP id 1mr699994otm.17.1488104742624;
        Sun, 26 Feb 2017 02:25:42 -0800 (PST)
In-Reply-To: <38052307-8ef9-4d41-b902-826f56630c10@isocpp.org>
X-Original-Sender: inkwizytoryankes@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:31150
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31150>

------=_Part_515_973129612.1488104742005
Content-Type: multipart/alternative; 
	boundary="----=_Part_516_371680355.1488104742005"

------=_Part_516_371680355.1488104742005
Content-Type: text/plain; charset=UTF-8



On Saturday, February 25, 2017 at 6:41:01 PM UTC+1, Nicol Bolas wrote:
>
> There have been a lot of proposals and ideas thrown about for various 
> `vector` classes that have identical interfaces but different behaviors. 
> I'm wondering if it might not be better to have them all aggregated into 
> some `omni_vector` type that uses a template parameter to pick which 
> particular options you want.
>
> A necessary first step is to figure out what all of the options such an 
> `omni_vector` might provide. Here are the ones I know about:
>
> * Small storage buffer (SSB) space: 0 to arbitrary number.
> * Maximum size: compile-time 
> static/runtime-upon-construction/always-unbounded
>
> One of the advantages of having all of these variances in one type is to 
> more easily require movement between them. So an `omni_vector` with SSB/16 
> and an `omni_vector` that has no SSB but has a fixed size can still be 
> efficiently moved between so long as the allocators are the same (and if 
> the SSB vector's current size is greater than its SSB size).
>
> Also, by putting them all in one type, you can create useful combinations. 
> Like a vector that never allocates memory, because the SSB size is equal to 
> the compile-time maximum size.
>
> Instantiating such a type might look like this: `omni_vector<Typename, 
> ov_params<ov_ssb<32>, ov_max_static<32>>`. The order of such parameters 
> would not be fixed; it would use template metaprogramming to pick the first 
> parameter from the list for a particular option.
>
> What are the other variances that people want?
>

This could fix problem with `std::vector<bool>`, current vector would be: 
`omni_vector<Typename, ov_compress_bool>` and if you want "normal" behavior 
you will use directly `omni_vector<bool>`.

-- 
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/dc2e850c-4cf4-450c-948c-5510ee88f622%40isocpp.org.

------=_Part_516_371680355.1488104742005
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Saturday, February 25, 2017 at 6:41:01 PM UTC+1=
, Nicol Bolas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr">There have been a lot of proposals and ideas thrown about for vari=
ous `vector` classes that have identical interfaces but different behaviors=
.. I&#39;m wondering if it might not be better to have them all aggregated i=
nto some `omni_vector` type that uses a template parameter to pick which pa=
rticular options you want.<br><br>A necessary first step is to figure out w=
hat all of the options such an `omni_vector` might provide. Here are the on=
es I know about:<br><br>* Small storage buffer (SSB) space: 0 to arbitrary =
number.<br>* Maximum size: compile-time static/runtime-upon-<wbr>constructi=
on/always-unbounded<br><br>One of the advantages of having all of these var=
iances in one type is to more easily require movement between them. So an `=
omni_vector` with SSB/16 and an `omni_vector` that has no SSB but has a fix=
ed size can still be efficiently moved between so long as the allocators ar=
e the same (and if the SSB vector&#39;s current size is greater than its SS=
B size).<br><br>Also, by putting them all in one type, you can create usefu=
l combinations. Like a vector that never allocates memory, because the SSB =
size is equal to the compile-time maximum size.<br><br>Instantiating such a=
 type might look like this: `omni_vector&lt;Typename, ov_params&lt;ov_ssb&l=
t;32&gt;, ov_max_static&lt;32&gt;&gt;`. The order of such parameters would =
not be fixed; it would use template metaprogramming to pick the first param=
eter from the list for a particular option.<br><br>What are the other varia=
nces that people want?<br></div></blockquote><div><br>This could fix proble=
m with `std::vector&lt;bool&gt;`, current vector would be: `omni_vector&lt;=
Typename, ov_compress_bool&gt;` and if you want &quot;normal&quot; behavior=
 you will use directly `omni_vector&lt;bool&gt;`.<br></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/dc2e850c-4cf4-450c-948c-5510ee88f622%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/dc2e850c-4cf4-450c-948c-5510ee88f622=
%40isocpp.org</a>.<br />

------=_Part_516_371680355.1488104742005--

------=_Part_515_973129612.1488104742005--

.
