220 30941 <08db6ce8-ca1c-4d75-a49a-d33e2fb8518b@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: Re: compressed std::bitset<N>
Date: Wed, 15 Feb 2017 23:29:35 -0800 (PST)
Lines: 94
Approved: news@gmane.org
Message-ID: <08db6ce8-ca1c-4d75-a49a-d33e2fb8518b@isocpp.org>
References: <32cfea0a-7df8-47cf-47fd-549985f12295@wanadoo.fr>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_11153_1965232507.1487230175364"
X-Trace: blaine.gmane.org 1487230177 12794 195.159.176.226 (16 Feb 2017 07:29:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 16 Feb 2017 07:29:37 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBX5JSXCQKGQE2LEDVLQ@isocpp.org Thu Feb 16 08:29:32 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBX5JSXCQKGQE2LEDVLQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f200.google.com ([209.85.192.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBX5JSXCQKGQE2LEDVLQ@isocpp.org>)
	id 1ceGVP-0002iu-9H
	for gclcip-std-proposals@m.gmane.org; Thu, 16 Feb 2017 08:29:31 +0100
Original-Received: by mail-pf0-f200.google.com with SMTP id c73sf14231720pfb.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Feb 2017 23:29:37 -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=Dr3uDxei0SWwbFvdU7RaemU15AwFIPbcAMecGVxbA9c=;
        b=AvjakRHf4I1CtZBvstNgW9QQ2uJDY3Nq9Bv8q84trN5qo7yDc6a6Y3MHl7T+uH1FOw
         FzFFZuJNMqabRHu/S/oay0G9ZIEnu0tTClXG7CwVqz1fTUicuimdtZpDXnxkdfbIwg1o
         gugL0lS3unHWS2C2ZwZPi2i5T9dlvG2wMc0yGq8kWxGuJiApiJRpJwcgFsoyrhtyEaSJ
         H7x9IBlB4U4BoKNsEu/9f8m/ppAR4NmXODljKhgk8IoR8uljBXqtvHMS51agnebCLwBa
         oqm23gV5t9smMaospDZ9x2MKfa3GzjP8rBlI2fPPMMeV9vhDav3Pa2LXK+SlLNC7Dj3H
         G68Q==
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=Dr3uDxei0SWwbFvdU7RaemU15AwFIPbcAMecGVxbA9c=;
        b=c3BbojII4JTOgeVUI8/ErPFmMO+SAGkN/nLTsc2E7JS3oOBv4Q5PWQxsv39X3F1mid
         FNdtBXeibuZvzCjo2hcXjXtDTBEXO8s596i+OkudDwjvKGz7l8G2RPfV0zcXIFctxPf1
         FZ7HpqpQtbHZ15pFHjHfUL5OV4ye1Wvr+cNgTtwfbaT8Pr0mvP5M73MVuggnYaUelCuX
         kURbrWL5oxF2dw9nxoIYqaj92+MREixtATsL+GQy0rcZjM9BU4JlmUxrFDPLh4ByeHOc
         QDe1fcPIVyD6X1URNBUQ+0TGhZE9/lncbVWzkQoL8fcNSdEziH23Xp27gTGG81QpSUtB
         P+gw==
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=Dr3uDxei0SWwbFvdU7RaemU15AwFIPbcAMecGVxbA9c=;
        b=hih9NPIAPtqMiUAGQR8/TrniYMPYr6Lv30JKC73Wp1cPS0rKFBh+dA8suLA5xYtCey
         DSft8F0LbXo33klUvb8jGkSQmGN2Dggl06uvIrNvtzB4oSC3z6YiDYsNoKd/u7WHy8l6
         RYNbTM/2WWf2KOFxJsE6uimSKQSN5KrovlEfOHMwPyMBcgdpEEybOTL/TQuDMLmCOASR
         D7daCONFMD/X9+gJfyutAanGrMDT6pKv5ThZj83qSY9X3S6tdnMFGXSldZnyG6ogzzzb
         V6/DW5+df50y39lIxZGADdJPWXSNu36dXigkd2J79SqyBPXqg29vlX0nfav1dHam4wft
         fn9Q==
X-Gm-Message-State: AMke39nSYvximNsSH5YG/ZfImHDMOYUkpBsTMli9tOnTY3TzW6eX0h5FgmclrtwBjV0lvg==
X-Received: by 10.99.24.85 with SMTP id 21mr259830pgy.15.1487230176647;
        Wed, 15 Feb 2017 23:29:36 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.38.42 with SMTP id a39ls835895otb.26.gmail; Wed, 15 Feb
 2017 23:29:35 -0800 (PST)
X-Received: by 10.157.11.97 with SMTP id p30mr27521otd.11.1487230175801;
        Wed, 15 Feb 2017 23:29:35 -0800 (PST)
In-Reply-To: <32cfea0a-7df8-47cf-47fd-549985f12295@wanadoo.fr>
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:30941
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30941>

------=_Part_11153_1965232507.1487230175364
Content-Type: multipart/alternative; 
	boundary="----=_Part_11154_1741110816.1487230175364"

------=_Part_11154_1741110816.1487230175364
Content-Type: text/plain; charset=UTF-8



On Thursday, February 16, 2017 at 2:04:53 AM UTC-5, Vicente J. Botet 
Escriba wrote:
>
> Hi,
>
> I wanted to use bitset<8>, bitset<16>, bitset<32> to represent the mask 
> of 8,16 and 32 bits respectively but the sizeof them is 64 bits on the  
> systems I've tested.
>
> Wondering if others have suffered already of this situation. 
>
> How do you fill about adding a constraint on the implementation, so that 
> the sizeof shall be respectively 8, 16, 32 bits.
>

I feel the same way I would feel about adding constraints on 
implementations to be required to implement `std::uint32_t` et. al. That 
is, "not gonna happen".

The best you would reasonably get is requiring that a `bitset<N>` will have 
a size no bigger than a `uint_leastN_t`, if `N` is <= 64.

I don't see anything in `bitset`'s API that would make this non-workable. 
That doesn't mean there isn't, obviously.

-- 
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/08db6ce8-ca1c-4d75-a49a-d33e2fb8518b%40isocpp.org.

------=_Part_11154_1741110816.1487230175364
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Thursday, February 16, 2017 at 2:04:53 AM UTC-5=
, Vicente J. Botet Escriba wrote:<blockquote class=3D"gmail_quote" style=3D=
"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex=
;">
 =20

   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <p><font size=3D"+1">Hi,</font></p>
    <p><font size=3D"+1">I wanted to use bitset&lt;8&gt;,</font><font size=
=3D"+1"> bitset&lt;16&gt;,</font><font size=3D"+1">
        bitset&lt;32&gt; to represent the mask of 8,16 and 32 bits
        respectively but the sizeof them is 64 bits on the=C2=A0 systems I&=
#39;ve
        tested.</font></p>
    <p><font size=3D"+1">Wondering if others have suffered already of this
        situation. <br>
      </font></p>
    <p><font size=3D"+1">How do you fill about adding a constraint on the
        implementation, so that the sizeof shall be respectively 8, 16,
        32 bits.</font></p></div></blockquote><div><br>I feel the same way =
I would feel about adding constraints on implementations to be required to =
implement `std::uint32_t` et. al. That is, &quot;not gonna happen&quot;.<br=
><br>The best you would reasonably get is requiring that a `bitset&lt;N&gt;=
` will have a size no bigger than a `uint_leastN_t`, if `N` is &lt;=3D 64.<=
br><br>I don&#39;t see anything in `bitset`&#39;s API that would make this =
non-workable. That doesn&#39;t mean there isn&#39;t, obviously.<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/08db6ce8-ca1c-4d75-a49a-d33e2fb8518b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/08db6ce8-ca1c-4d75-a49a-d33e2fb8518b=
%40isocpp.org</a>.<br />

------=_Part_11154_1741110816.1487230175364--

------=_Part_11153_1965232507.1487230175364--

.
