220 31505 <cba4201d-6ef5-8a89-b144-e849f6de5b06@wanadoo.fr> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: compressed std::bitset<N>
Date: Wed, 8 Mar 2017 13:29:30 +0100
Lines: 134
Approved: news@gmane.org
Message-ID: <cba4201d-6ef5-8a89-b144-e849f6de5b06@wanadoo.fr>
References: <32cfea0a-7df8-47cf-47fd-549985f12295@wanadoo.fr>
 <06e829ca-417b-470c-95ca-c661e8752f79@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------9E4DE8759756A3D0C7F84CA2"
X-Trace: blaine.gmane.org 1488976183 19712 195.159.176.226 (8 Mar 2017 12:29:43 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 8 Mar 2017 12:29:43 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0)
 Gecko/20100101 Thunderbird/45.7.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBK7S77CQKGQEDWWEYGQ@isocpp.org Wed Mar 08 13:29:27 2017
Return-path: <std-proposals+bncBDH67CONY4PBBK7S77CQKGQEDWWEYGQ@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+bncBDH67CONY4PBBK7S77CQKGQEDWWEYGQ@isocpp.org>)
	id 1claic-0003jj-QP
	for gclcip-std-proposals@m.gmane.org; Wed, 08 Mar 2017 13:29:26 +0100
Original-Received: by mail-lf0-f71.google.com with SMTP id h89sf19315271lfi.6
        for <gclcip-std-proposals@m.gmane.org>; Wed, 08 Mar 2017 04:29:33 -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: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=cdMWTGKxQK01dErQtf4tdhdzD8zg/y63rhwkQ5Zspeo=;
        b=C6jK1cLK3IE5aa1wjiuZyzXhg4p8dq37TEZy5qYAy9YRznCb9iFW/CSGFGxNnPQ7O4
         taIrxwW7aihK5jRa4lA4NUt9xqAZ1iGgFnJuGTB7QhvEBUJmrGP0Xl8ZQhI/gxhSOxcH
         CXSxauPL2XbBbysDnG02J30bzX6V3JVg/sX7yMToPh9Eg3zAbXvdaMZK6gk4Q3HEJc0u
         7A0xl1kELUSNaNqEiEcs2m+/GDJSSFpV6MpC30Khqul4sREhnbPqlJGzklV3vqV9uzlE
         rVvpFRtaNnYqF4fmiA4J7esc6Ye9CMMXVOqswnwe3cu8OUbQySVpkAx+jn1Vmjoay5lp
         Ia1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to: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=cdMWTGKxQK01dErQtf4tdhdzD8zg/y63rhwkQ5Zspeo=;
        b=l/CnpCCIMknw5iRHUuNqYwFV2UwI0Lffn+sejZd9YV1CTP/7k9iebIyZLmxNW9uNnp
         VQ4VVCPlmpSJFdpK8ZzdpqJ7lDFsPcdEyteSdb36eIhj0kq1b6Dev+U96aKZdL01EEie
         A2n/l8l9eG4lz0Af7izCVREzza0vLDHBBM77MzpbLVxuWMMPvJI61JlEj7uL5bd2QDar
         BJqckBnGhI3Rj8zFwuMTrMQKdyd/kzQGLWmi9gTRnp+SY17lk7pt8Bjr8kqPfv86LMmD
         WiAGdcPOvp3OkfegY7pfrLNXz8yOfgsARgs6E10HPtZ+QMdT9KpYTYwnWlLdh0OAnGid
         CmNw==
X-Gm-Message-State: AMke39nscoKLD5FXsDlZ5UpP3Ci3l2q90mMvSPQBQZUjXb9w1p+jRxDKY+HE3fton3+6NQ==
X-Received: by 10.46.7.80 with SMTP id i16mr968271ljd.5.1488976173178;
        Wed, 08 Mar 2017 04:29:33 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.109.67 with SMTP id i64ls485062wmc.7.gmail; Wed, 08 Mar
 2017 04:29:31 -0800 (PST)
X-Received: by 10.223.165.6 with SMTP id i6mr5528396wrb.18.1488976171584;
        Wed, 08 Mar 2017 04:29:31 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr. [80.12.242.130])
        by mx.google.com with ESMTPS id f12si23055433wmd.44.2017.03.08.04.29.31
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Wed, 08 Mar 2017 04:29:31 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.130 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.130;
Original-Received: from imac-de-vicente-botet-escriba.home ([92.139.161.125])
	by mwinf5d31 with ME
	id tQVW1u00k2ie32s03QVWWt; Wed, 08 Mar 2017 13:29:31 +0100
X-ME-Helo: imac-de-vicente-botet-escriba.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Wed, 08 Mar 2017 13:29:31 +0100
X-ME-IP: 92.139.161.125
In-Reply-To: <06e829ca-417b-470c-95ca-c661e8752f79@isocpp.org>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.130 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
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:31505
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31505>

This is a multi-part message in MIME format.
--------------9E4DE8759756A3D0C7F84CA2
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 21/02/2017 =C3=A0 21:40, ricky.65@hotmail.com a =C3=A9crit :
> Hi Vicente,
>
> I think the Bitset2 <https://github.com/ClaasBontus/bitset2>library by=20
> Claas Bontus provides what you are looking for. It's like std::bitset=20
> but with enhanced functionality. It let's you set the underlying=20
> integral type of the bitset. In fact, it defaults to uint8_t,=20
> uint16_t, or uint32_t if N bits fit into those integers. I would like=20
> this functionality added to std::bitset but, as you said, it would=20
> probably be a breaking change.
>
Thanks for the link. Yes, this is close to what I need and in addition=20
generalize well to more than 64 bits.

As we would have span soon,  the data() function should IMO return a span.

The template parameter in=20
https://github.com/ClaasBontus/bitset2/blob/master/bitset2.hpp#L50 seam=20
artificial an unnecesary. A static assert should work here.

A would like a trivial type implementation, so that we can use it where=20
we used before an int16_t e.g.

I don't have a use case for
# Additional constexpr operator |+| for adding two bitset2 objects.
# Additional operators |++|, |--|, |+=3D|.

and IMO this is shouldn't be a numeric type.

Vicente

--=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/cba4201d-6ef5-8a89-b144-e849f6de5b06%40wanadoo.f=
r.

--------------9E4DE8759756A3D0C7F84CA2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 21/02/2017 =C3=A0 21:40,
      <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:ricky.65@hotmail=
..com">ricky.65@hotmail.com</a> a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:06e829ca-417b-470c-95ca-c661e8752f79@isocpp.org"
      type=3D"cite">
      <div dir=3D"ltr">Hi Vicente,
        <div><br>
        </div>
        <div><font face=3D"arial, sans-serif" size=3D"2">I think the <a
              moz-do-not-send=3D"true"
              href=3D"https://github.com/ClaasBontus/bitset2">Bitset2 </a>l=
ibrary
            by Claas Bontus provides what you are looking for. It's like
            std::bitset but with enhanced functionality. It let's you
            set the underlying integral type of the bitset. In fact, it=C2=
=A0<span
              style=3D"color: rgb(51, 51, 51);">defaults to uint8_t,
              uint16_t, or uint32_t=C2=A0</span><span style=3D"color: rgb(5=
1,
              51, 51);">if N</span><span style=3D"color: rgb(51, 51, 51);">=
=C2=A0bits
              fit into those integers.</span>=C2=A0I would like this
            functionality added to std::bitset but, as you said, it
            would probably be a breaking change.</font></div>
        <div><br>
        </div>
      </div>
    </blockquote>
    Thanks for the link. Yes, this is close to what I need and in
    addition generalize well to more than 64 bits.<br>
    <br>
    As we would have span soon,=C2=A0 the data() function should IMO return=
 a
    span.<br>
    <br>
    The template parameter in
    <a class=3D"moz-txt-link-freetext" href=3D"https://github.com/ClaasBont=
us/bitset2/blob/master/bitset2.hpp#L50">https://github.com/ClaasBontus/bits=
et2/blob/master/bitset2.hpp#L50</a>
    seam artificial an unnecesary. A static assert should work here.<br>
    <br>
    A would like a trivial type implementation, so that we can use it
    where we used before an int16_t e.g.<br>
    <br>
    I don't have a use case for<br>
    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8=
">
    <li>Additional constexpr operator <code>+</code> for adding two
      bitset2 objects.</li>
    <li>Additional operators <code>++</code>, <code>--</code>, <code>+=3D</=
code>.</li>
    <br>
    and IMO this is shouldn't be a numeric type.<br>
    <br>
    Vicente
  </body>
</html>

<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/cba4201d-6ef5-8a89-b144-e849f6de5b06%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/cba4201d-6ef5-8a89-b144-e849f6de5b06=
%40wanadoo.fr</a>.<br />

--------------9E4DE8759756A3D0C7F84CA2--

.
