220 13469 <63de9d71-e3b0-4242-9698-bea3a307b3c7@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Fioravante <fmatthew5876@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Proposal: Strongly Typed Bitset
Date: Wed, 1 Oct 2014 18:26:11 -0700 (PDT)
Lines: 257
Approved: news@gmane.org
Message-ID: <63de9d71-e3b0-4242-9698-bea3a307b3c7@isocpp.org>
References: <f77c8cc7-64f6-4d3b-9a10-8a5ee5f2254d@isocpp.org> <113390b2-9c74-47e2-a943-5d27dd48bdf1@isocpp.org>
 <CAGg_6+P+Hsq_stLp4+CTyK3ezvOvCAyCy7hBu+ZqSbJMfJHQ8w@mail.gmail.com>
 <41983d24-efb2-4255-b09b-f84cff7bf56d@isocpp.org>
 <f24d9028-86d6-4fc7-b5bf-03aacebb18d5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_6190_1238732653.1412213171801"
X-Trace: ger.gmane.org 1412213179 7404 80.91.229.3 (2 Oct 2014 01:26:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 2 Oct 2014 01:26:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDELF54RTIGRBNGTWKQQKGQEW5XZJ4Y@isocpp.org Thu Oct 02 03:26:14 2014
Return-path: <std-proposals+bncBDELF54RTIGRBNGTWKQQKGQEW5XZJ4Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f70.google.com ([209.85.220.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDELF54RTIGRBNGTWKQQKGQEW5XZJ4Y@isocpp.org>)
	id 1XZV9q-00059s-7o
	for gclcip-std-proposals@m.gmane.org; Thu, 02 Oct 2014 03:26:14 +0200
Original-Received: by mail-pa0-f70.google.com with SMTP id et14sf6602295pad.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Oct 2014 18:26:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=kg2xpYchjfBl339E0jswUhnZV6xgDuA3ORosW5ohi/w=;
        b=M1MsLyRXfgIWyZeQhPeXpabbwFezDK1n7bKTsZp5zCi2stTMsKRQjklZfo8Y6ReW4N
         oX6qFWl2uxdVrx4qmRdqA6Q9kYG6tuSI76n+B+XSKoc7194nbGmICQ5zJ0mswTbkm6jt
         JEFNmTVrpDGTHHDjg2jlXgI2mKQSGRGBAPCP+JWElKah1zmjk2ypf3enFHx8saBBREwE
         XZ7MSO15t+ohcTFjoHfgATkkJDPa9fmxuL1SWMldd6J/6RxLga+LPTfen/83MyXdkitx
         HLHkRLiuOBhNTxzhYQ1mZoN2ul/f4mnqcx2K6f21MiT4gu/4gvvExqOIhCQWqu8HlUr6
         6iTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=kg2xpYchjfBl339E0jswUhnZV6xgDuA3ORosW5ohi/w=;
        b=IW+4CTLY9m5urT9VeRmY/XPcce4M8ZqraAXo57fstftPl1QrCMMgrZHo7UngxHW+66
         kB/sOAL1zEtIyxK35Zx489Y9Wx4UqnMvHB0B2R2h7sxvwVUb2qEFfPFARxEAmnYEL9qk
         8XYGwie4o4XfwJetG+8Tz1DKnYWB+f2EdSeNpe/5AZsfdX+Ao/aJBlKpc6kQFHyS/fVr
         9MefkqU/ZYu2tvyC+tQq9KI/8NdgS31qkA5VCPXrv8KOYsG5snn7JWsQrncULaAnThf1
         WAS72wJTDarU2oKJ/XmXLo7x0WvuBqx+0SL67/T3a/ttKfMR81Z46Dwpyp85CuQFxy3B
         Z6HA==
X-Gm-Message-State: ALoCoQn8IeMeYieNtYi9nb2bTPhdUixqngM1BchSZ0S+ScSqTBy2SQx4lOhFsM6uVuQgATBD1d6F
X-Received: by 10.68.219.226 with SMTP id pr2mr48541660pbc.4.1412213173191;
        Wed, 01 Oct 2014 18:26:13 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.36.244 with SMTP id p107ls696730qgp.94.gmail; Wed, 01 Oct
 2014 18:26:12 -0700 (PDT)
X-Received: by 10.140.94.10 with SMTP id f10mr65025qge.11.1412213172452;
        Wed, 01 Oct 2014 18:26:12 -0700 (PDT)
In-Reply-To: <f24d9028-86d6-4fc7-b5bf-03aacebb18d5@isocpp.org>
X-Original-Sender: fmatthew5876@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13469
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13469>

------=_Part_6190_1238732653.1412213171801
Content-Type: text/plain; charset=UTF-8

I've updated the draft with fast_bitset and small_bitset.

https://github.com/fmatthew5876/stdcxx-bitset

I had some ideas for additional directions to go into. I've not put these 
in the paper.

Some new public members:

template <size_t N, typename T> class bitset {
  public:  
    using underlying_type = T[N / (sizeof(T) * CHAR_BIT) + 1];

    array<T,sizeof(underlying_type) / sizeof(T)> get_underlying() const;
    void set_underlying(array<T,sizeof(underlying_type) / sizeof(T)> a);
  

get_underlying() would return an array of T whose bits are identical to the 
bits stored in the bitset. All of the bits > N would be 0.
set_underlying(a) would set the internal bits to the values of the bits in 
a. All of the bits > N are ignored.

Alternatively, instead of value semantics we could do reference semantics:
template <size_t N, typename T> class bitset {
  public:  
    using underlying_type = T[N / (sizeof(T) * CHAR_BIT) + 1];

    array<T,sizeof(underlying_type) / sizeof(T)>& rep();
    const array<T,sizeof(underlying_type) / sizeof(T)>& rep() const;


This is more dangerous as bitset is a value type which can be freely 
copied, but it might be more efficient for large bitsets.

With either of these options, we could deprecate bitset::to_ulong() and 
bitset::to_ullong().

Finally, (this might be a separate proposal) bitset::to_string() is really 
an inefficient design. It returns a std::string which will require a memory 
allocation.

Instead of that, to_string() could return std::array<char,N+1>, which holds 
a null terminated bitstring.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_6190_1238732653.1412213171801
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I've updated the draft with fast_bitset and small_bitset.<=
div><br></div><div>https://github.com/fmatthew5876/stdcxx-bitset<br></div><=
div><br></div><div>I had some ideas for additional directions to go into. I=
've not put these in the paper.</div><div><br></div><div>Some new public me=
mbers:</div><div><br></div><div><div class=3D"prettyprint" style=3D"backgro=
und-color: rgb(250, 250, 250); border: 1px solid rgb(187, 187, 187); word-w=
rap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"=
><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">size_t N</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> T</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><font color=3D"#000088"><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">class</span></font><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> bitset </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>&nbsp; </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">public</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> &nbsp;<br>&nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">using</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> underlying_type </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> T</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">[</span><span style=3D"color: #000;" class=3D"styled-by-prettify">N <=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">/</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">sizeof</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">T</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> CHAR_BIT</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">+</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" =
class=3D"styled-by-prettify">1</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">];</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br><br>&nbsp; &nbsp; array</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">T</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">,</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">sizeof</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">underly=
ing_type</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">/</span><font color=
=3D"#000000"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">sizeof</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">)</span></font><span style=3D"color=
: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> get_underlying</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"=
styled-by-prettify">const</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>&nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"styled=
-by-prettify">void</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> set_underlying</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">array</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">T</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><font co=
lor=3D"#000000"><span style=3D"color: #008;" class=3D"styled-by-prettify">s=
izeof</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify">underlying_typ=
e</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">/</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">sizeof</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify">T</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">)&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</s=
pan></font><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&n=
bsp; </span></div></code></div><br>get_underlying() would return an array o=
f T whose bits are identical to the bits stored in the bitset. All of the b=
its &gt; N would be 0.</div><div>set_underlying(a) would set the internal b=
its to the values of the bits in a. All of the bits &gt; N are ignored.</di=
v><div><br></div><div>Alternatively, instead of value semantics we could do=
 reference semantics:</div><div><div class=3D"prettyprint" style=3D"backgro=
und-color: rgb(250, 250, 250); border: 1px solid rgb(187, 187, 187); word-w=
rap: break-word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"=
><span style=3D"color: #008;" class=3D"styled-by-prettify">template</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">size_t N</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">typename</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> T</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><font color=3D"#000088"><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">class</span></font><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> bitset </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>&nbsp; </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">public</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> &nbsp;<br>&nbsp; &nbsp; </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">using</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> underlying_type </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> T</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">[</span><span style=3D"color: #000;" class=3D"styled-by-prettify">N <=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">/</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">sizeof</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify">T</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">*<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> CHAR_BIT</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">+</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" =
class=3D"styled-by-prettify">1</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">];</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br><br>&nbsp; &nbsp; array</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">T</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">,</span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">sizeof</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">underly=
ing_type</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">/</span><font color=
=3D"#000000"><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">sizeof</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">)</span></font><span style=3D"color=
: #660;" class=3D"styled-by-prettify">&gt;&amp;</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> rep</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">()</span><font color=3D"#000000"><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"><br></span></font><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">&nbsp; &nbsp; </span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">const</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> array</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">T</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">,</span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">sizeof</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">und=
erlying_type</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">/</span><font co=
lor=3D"#000000"><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">sizeof</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">)</span></font><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&gt;&amp;</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> rep</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">const</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br><br></span></div></code></div><div><br></div>This is more dangerous =
as bitset is a value type which can be freely copied, but it might be more =
efficient for large bitsets.</div><div><br></div><div>With either of these =
options, we could deprecate bitset::to_ulong() and bitset::to_ullong().</di=
v><div><br></div><div>Finally, (this might be a separate proposal) bitset::=
to_string() is really an inefficient design. It returns a std::string which=
 will require a memory allocation.</div><div><br></div><div>Instead of that=
, to_string() could return std::array&lt;char,N+1&gt;, which holds a null t=
erminated bitstring.<br><br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_6190_1238732653.1412213171801--

.
