220 31135 <38052307-8ef9-4d41-b902-826f56630c10@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Domains of specialized `vector` variance
Date: Sat, 25 Feb 2017 09:41:00 -0800 (PST)
Lines: 89
Approved: news@gmane.org
Message-ID: <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_2885_1638680542.1488044460814"
X-Trace: blaine.gmane.org 1488044463 8299 195.159.176.226 (25 Feb 2017 17:41:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 25 Feb 2017 17:41:03 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBLMDY7CQKGQEZEMUYHI@isocpp.org Sat Feb 25 18:40:58 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBLMDY7CQKGQEZEMUYHI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pg0-f71.google.com ([74.125.83.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBLMDY7CQKGQEZEMUYHI@isocpp.org>)
	id 1chgL2-0001Oi-OV
	for gclcip-std-proposals@m.gmane.org; Sat, 25 Feb 2017 18:40:56 +0100
Original-Received: by mail-pg0-f71.google.com with SMTP id 5sf96914688pgj.3
        for <gclcip-std-proposals@m.gmane.org>; Sat, 25 Feb 2017 09:41:03 -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: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=+y+fuoluE91yrELkS2o/SWJz7/wh8caDt36/1jJvtEY=;
        b=gWXOyN0JUijQEDvezN5RhFV3FMbM1N3C50Ar8+QaGpXOFx1nGv8X+bs5LioKKbDKit
         5aRci62vZRHeIQqiEE6kv7Zgo4L33YSRokzqdl81At2B/acC8XNvKbzkNxDV3CNSLuAy
         TK1lp0GZpA2U21fP7m8bVfbeo2BSq4ux8R18DmRNiOzcs0jBfcD1CATjkjipzAC37mfv
         c6WsozH6e0rBWIBt1oSI2PhAnQ99DiBY+zeZDXjIa7WfCchmBRCfwEjGUY76Z+nwPTm7
         S87pMj122G9DVyhgCMQaE0ZMrCljcxK1P20HhT49bD1KFNfl5Oybu/2i4aUb+bREZGD5
         /01A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id: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=+y+fuoluE91yrELkS2o/SWJz7/wh8caDt36/1jJvtEY=;
        b=rRwE9gDC3YSKrDUOvvsmebh4mqniKYHiHgKtKFntdDoXIkzk6DW2yNgdC1GDHrnmuh
         9ucaLBNvVxeXq2bp88mEwmnJZhZ/J8IxzZ1g2l8k9IVXhN7NkqgIN+H07Bc3XtK4a2rd
         aFMY+iTTLgfGugcpbDvapLdvXuyrxOrPTL+haEUAYDcgA0LBALNjcoMA8XzXh8oQBX2F
         fKdI0IsZhimr87Nra9dZa1uTTd5HAvoQlJeH3cByegBu4eqdGSK0Wjqi68I8yORefwJd
         3FCGUOLzJ6AfMdTi7DoV9fc47khUfKOR74MBPf9MNSPcwveWEOu+krEILoqtwd9ZGH2L
         OKfQ==
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: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=+y+fuoluE91yrELkS2o/SWJz7/wh8caDt36/1jJvtEY=;
        b=ku6+3TLim71TEDD6lIdJrys+S4YkO3f35LFxiWvkkFXvaymRu69UvfHzsFdNkuKrED
         NI8aYBopD48gZIMrCsfJbgYSq81H9YNOZq3zKLGQuB1hmFBZS/SveNgZj4GsELsUGKWT
         BoUIEbttbfqS88paZlui3SpisMF00vH7iPjFhlYbT8eupwjStCZS7g8Vtv8s/fKILPfC
         K++ri1lhrYwwOYf0hwrMsfsxYsByOOioApqfNFEn+a/qFSO4BXAzEOlU+L5jS39x6noG
         uaA34DkLiBiWBAlpFbZKUi5rsbHMQdpdm4X2qFDImgPeoiDXILuqrR+dBCGBNtVVbrEV
         1s9g==
X-Gm-Message-State: AMke39nUV0tdTmJPlu6rOh6RSnhnzi4vtcrnFQCLpj/ZeyL6AvxqJeThCY9nPTKxMm+Jug==
X-Received: by 10.99.8.196 with SMTP id 187mr3153529pgi.115.1488044462238;
        Sat, 25 Feb 2017 09:41:02 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.16.34 with SMTP id h31ls8659110ote.3.gmail; Sat, 25 Feb
 2017 09:41:01 -0800 (PST)
X-Received: by 10.157.82.86 with SMTP id q22mr627832otg.3.1488044461550;
        Sat, 25 Feb 2017 09:41:01 -0800 (PST)
X-Original-Sender: jmckesson@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:31135
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31135>

------=_Part_2885_1638680542.1488044460814
Content-Type: multipart/alternative; 
	boundary="----=_Part_2886_1821907842.1488044460814"

------=_Part_2886_1821907842.1488044460814
Content-Type: text/plain; charset=UTF-8

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?

-- 
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/38052307-8ef9-4d41-b902-826f56630c10%40isocpp.org.

------=_Part_2886_1821907842.1488044460814
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">There have been a lot of proposals and ideas thrown about =
for various `vector` classes that have identical interfaces but different b=
ehaviors. I&#39;m wondering if it might not be better to have them all aggr=
egated into some `omni_vector` type that uses a template parameter to pick =
which particular options you want.<br><br>A necessary first step is to figu=
re out what all of the options such an `omni_vector` might provide. Here ar=
e the ones I know about:<br><br>* Small storage buffer (SSB) space: 0 to ar=
bitrary number.<br>* Maximum size: compile-time static/runtime-upon-constru=
ction/always-unbounded<br><br>One of the advantages of having all of these =
variances in one type is to more easily require movement between them. So a=
n `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&#39;s current size is greater than its=
 SSB size).<br><br>Also, by putting them all in one type, you can create us=
eful combinations. Like a vector that never allocates memory, because the S=
SB size is equal to the compile-time maximum size.<br><br>Instantiating suc=
h a type might look like this: `omni_vector&lt;Typename, ov_params&lt;ov_ss=
b&lt;32&gt;, ov_max_static&lt;32&gt;&gt;`. The order of such parameters wou=
ld not be fixed; it would use template metaprogramming to pick the first pa=
rameter from the list for a particular option.<br><br>What are the other va=
riances that people want?<br></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/38052307-8ef9-4d41-b902-826f56630c10%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/38052307-8ef9-4d41-b902-826f56630c10=
%40isocpp.org</a>.<br />

------=_Part_2886_1821907842.1488044460814--

------=_Part_2885_1638680542.1488044460814--

.
